You are here

public function ForwardLink::__construct in Forward 8

Same name in this branch
  1. 8 src/Plugin/DsField/ForwardLink.php \Drupal\forward\Plugin\DsField\ForwardLink::__construct()
  2. 8 src/Plugin/views/field/ForwardLink.php \Drupal\forward\Plugin\views\field\ForwardLink::__construct()
Same name and namespace in other branches
  1. 8.3 src/Plugin/views/field/ForwardLink.php \Drupal\forward\Plugin\views\field\ForwardLink::__construct()
  2. 8.2 src/Plugin/views/field/ForwardLink.php \Drupal\forward\Plugin\views\field\ForwardLink::__construct()

Constructs a Display Suite field plugin.

Parameters

array $configuration:

string $plugin_id:

mixed $plugin_definition:

\Drupal\forward\ForwardAccessCheckerInterface $access_checker:

\Drupal\forward\ForwardLinkBuilderInterface $link_builder:

\Drupal\Core\Config\ConfigFactoryInterface; $configFactory:

Overrides HandlerBase::__construct

File

src/Plugin/views/field/ForwardLink.php, line 54

Class

ForwardLink
Field handler to flag the node type.

Namespace

Drupal\forward\Plugin\views\field

Code

public function __construct($configuration, $plugin_id, $plugin_definition, ForwardAccessCheckerInterface $access_checker, ForwardLinkBuilderInterface $link_builder, ConfigFactoryInterface $config_factory) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->accessChecker = $access_checker;
  $this->linkBuilder = $link_builder;

  // Force standard render since inline render is part of the "Links" DS element
  $settings = $config_factory
    ->get('forward.settings')
    ->get();
  $settings['forward_link_inline'] = FALSE;
  $this->settings = $settings;
}