You are here

public static function LinkTargetFieldWidget::getTargets in Link target 8

Helper function to provide an array of target options.

Return value

array The options to use as targets

2 calls to LinkTargetFieldWidget::getTargets()
LinkTargetFieldWidget::getSelectedOptions in src/Plugin/Field/FieldWidget/LinkTargetFieldWidget.php
Retrieve settings and convert to an array that includes on those selected.
LinkTargetFieldWidget::settingsForm in src/Plugin/Field/FieldWidget/LinkTargetFieldWidget.php
Returns a form to configure settings for the widget.

File

src/Plugin/Field/FieldWidget/LinkTargetFieldWidget.php, line 75

Class

LinkTargetFieldWidget
Plugin implementation of the 'link_target_field_widget' widget.

Namespace

Drupal\link_target\Plugin\Field\FieldWidget

Code

public static function getTargets() {
  return [
    '_self' => t('Current window (_self)'),
    '_blank' => t('New window (_blank)'),
    'parent' => t('Parent window (_parent)'),
    'top' => t('Topmost window (_top)'),
  ];
}