You are here

public function ForwardLink::build in Forward 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/DsField/ForwardLink.php \Drupal\forward\Plugin\DsField\ForwardLink::build()
  2. 8.2 src/Plugin/DsField/ForwardLink.php \Drupal\forward\Plugin\DsField\ForwardLink::build()

File

src/Plugin/DsField/ForwardLink.php, line 96

Class

ForwardLink
Forward link plugin.

Namespace

Drupal\forward\Plugin\DsField

Code

public function build() {
  $render_array = array();

  // Build the link unless Forward is rendering an email
  $config = $this
    ->getConfiguration();
  if (empty($config['build']['#forward_build'])) {
    $render_array = $this->linkBuilder
      ->buildForwardEntityLink($this
      ->entity(), $this->settings);
  }
  return $render_array;
}