'above' =>
$this->
t('Above'
),
'inline' =>
$this->
t('Inline'
),
'hidden' => '- ' .
$this->
t('Hidden'
) . ' -',
'visually_hidden' => '- ' .
$this->
t('Visually Hidden'
) . ' -',
],
'#default_value' =>
$config['formatter'
]['label'
],
];
$form['formatter'
]['type'
] =
[ '#type' => 'select',
'#title' =>
$this->
t('Formatter'
),
'#options' =>
$this->
getApplicablePluginOptions($this->
getFieldDefinition()),
'#required' => TRUE,
'#default_value' =>
$config['formatter'
]['type'
],
'#ajax' =>
[ 'callback' =>
[static::
class, 'formatterSettingsAjaxCallback'
],
'wrapper' => 'formatter-settings-wrapper',
],
];
// Add the formatter settings to the form via AJAX.
$form['formatter'
]['settings_wrapper'
] =
[ '#prefix' => '<div id="formatter-settings-wrapper">',