You are here

protected function ExtraFieldEntityLinkPlugin::getEntityLinkOptions in Entity Extra Field 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/ExtraFieldType/ExtraFieldEntityLinkPlugin.php \Drupal\entity_extra_field\Plugin\ExtraFieldType\ExtraFieldEntityLinkPlugin::getEntityLinkOptions()

Get the entity link options.

Return value

array An array of the link options.

1 call to ExtraFieldEntityLinkPlugin::getEntityLinkOptions()
ExtraFieldEntityLinkPlugin::buildEntityLink in src/Plugin/ExtraFieldType/ExtraFieldEntityLinkPlugin.php
Build the entity link.

File

src/Plugin/ExtraFieldType/ExtraFieldEntityLinkPlugin.php, line 143

Class

ExtraFieldEntityLinkPlugin
Define the extra field entity link type.

Namespace

Drupal\entity_extra_field\Plugin\ExtraFieldType

Code

protected function getEntityLinkOptions() {
  $options = [];
  $configuration = $this
    ->getConfiguration();
  if ($target = $configuration['link_target']) {
    $options['attributes']['target'] = $target;
  }
  return $options;
}