You are here

public function EntityReferenceLabelFormatter::settingsForm in Entity reference 8

Implements Drupal\field\Plugin\Type\Formatter\FormatterInterface::settingsForm().

File

lib/Drupal/entityreference/Plugin/field/formatter/EntityReferenceLabelFormatter.php, line 37
Definition of Drupal\entityreference\Plugin\field\formatter\EntityReferenceLabelFormatter.

Class

EntityReferenceLabelFormatter
Plugin implementation of the 'entity-reference label' formatter.

Namespace

Drupal\entityreference\Plugin\field\formatter

Code

public function settingsForm(array $form, array &$form_state) {
  $elements['link'] = array(
    '#title' => t('Link label to the referenced entity'),
    '#type' => 'checkbox',
    '#default_value' => $this
      ->getSetting('link'),
  );
  return $elements;
}