function Raw::__construct

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/argument_default/Raw.php \Drupal\views\Plugin\views\argument_default\Raw::__construct()
  2. 10 core/modules/views/src/Plugin/views/argument_default/Raw.php \Drupal\views\Plugin\views\argument_default\Raw::__construct()
  3. 11.x core/modules/views/src/Plugin/views/argument_default/Raw.php \Drupal\views\Plugin\views\argument_default\Raw::__construct()

Constructs a Raw 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\path_alias\AliasManagerInterface $alias_manager: The alias manager.

\Drupal\Core\Path\CurrentPathStack $current_path: The current path.

Overrides PluginBase::__construct

File

core/modules/views/src/Plugin/views/argument_default/Raw.php, line 53

Class

Raw
Default argument plugin to use the raw value from the URL.

Namespace

Drupal\views\Plugin\views\argument_default

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, $alias_manager, CurrentPathStack $current_path) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    if (!$alias_manager instanceof AliasManagerInterface) {
        @trigger_error('Calling \\' . __METHOD__ . ' with \\' . CoreAliasManagerInterface::class . ' instead of \\' . AliasManagerInterface::class . ' is deprecated in drupal:8.8.0. The new service will be required in drupal:9.0.0. See https://www.drupal.org/node/3092086', E_USER_DEPRECATED);
        $alias_manager = \Drupal::service('path_alias.manager');
    }
    $this->aliasManager = $alias_manager;
    $this->currentPath = $current_path;
}

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