public function submitOptionsForm(&
$form, FormStateInterface
$form_state) { parent::
submitOptionsForm($form,
$form_state);
// Load the referenced entity and store its config target identifier if
// the target does not contains tokens.
// @todo Use a method to check for tokens in
// https://www.drupal.org/node/2396607.
$options =
$form_state->
getValue('options'
);
if (!
str_contains($options['target'
], '{{'
)) { if ($entity =
$this->entityTypeManager->
getStorage($this->entityType
)->
load($options['target'
])) { $options['target'
] =
$entity->
getConfigTarget();
} $form_state->
setValue('options',
$options);
} } /**
* {@inheritdoc}
*/
public function render($empty = FALSE
) { if (!
$empty || !
empty($this->options
['empty'
])) { // @todo Use a method to check for tokens in