function Links::__construct

Same name in other branches
  1. 11.x core/modules/views/src/Plugin/views/field/Links.php \Drupal\views\Plugin\views\field\Links::__construct()

Constructs a Links object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Routing\RedirectDestinationInterface|null $redirectDestination: The redirect destination service.

Overrides HandlerBase::__construct

File

core/modules/views/src/Plugin/views/field/Links.php, line 30

Class

Links
An abstract handler which provides a collection of links.

Namespace

Drupal\views\Plugin\views\field

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ?RedirectDestinationInterface $redirectDestination = NULL) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    if ($redirectDestination === NULL) {
        $this->redirectDestination = \Drupal::service('redirect.destination');
        @trigger_error('Calling' . __METHOD__ . '() without the $redirectDestination argument is deprecated in drupal:10.1.0 and is required in drupal:11.0.0. See https://www.drupal.org/node/3343983', E_USER_DEPRECATED);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.