$scheme_options = \Drupal::
service('stream_wrapper_manager'
)->
getNames(StreamWrapperInterface::WRITE_VISIBLE
);
$element['uri_scheme'
] =
[ '#type' => 'radios',
'#title' =>
$this->
t('Upload destination'
),
'#options' =>
$scheme_options,
'#default_value' =>
$settings['uri_scheme'
],
'#description' =>
$this->
t('Select where the final files should be stored. Private file storage has significantly more overhead than public files, but allows restricted access to files within this field.'
),
];
// Add default_image element.
static::
defaultImageForm($element,
$settings);
$element['default_image'
]['#description'
] =
$this->
t('If no image is uploaded, this image will be shown on display.'
);
return $element;
} /**
* {@inheritdoc}
*/
public function fieldSettingsForm(array
$form, FormStateInterface
$form_state) { // Get base form from FileItem.
$element = parent::
fieldSettingsForm($form,
$form_state);