public static function TermSelection::settingsForm

Overrides SelectionBase::settingsForm().

Overrides SelectionBase::settingsForm

File

drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/entity_reference/selection/TermSelection.php, line 39
Contains \Drupal\taxonomy\Plugin\entity_reference\selection\TermSelection.

Class

TermSelection
Provides specific access control for the taxonomy_term entity type.

Namespace

Drupal\taxonomy\Plugin\entity_reference\selection

Code

public static function settingsForm(&$field, &$instance) {
  $form = parent::settingsForm($field, $instance);

  // @todo: Currently allow auto-create only on taxonomy terms.
  $form['auto_create'] = array(
    '#type' => 'checkbox',
    '#title' => t("Create referenced entities if they don't already exist"),
    '#default_value' => $instance['settings']['handler_settings']['auto_create'],
  );
  return $form;
}