public function Content::__construct in JS Callback Handler 8.3
Constructs a \Drupal\Component\Plugin\PluginBase 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.
Overrides JsCallbackBase::__construct
File
- src/
Plugin/ Js/ Content.php, line 48
Class
- Content
- Plugin annotation @JsCallback( id = "js.content", allowed_methods = { "GET" }, csrf_token = FALSE, )
Namespace
Drupal\js\Plugin\JsCode
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->controllerResolver = \Drupal::service('controller_resolver');
$this->router = \Drupal::service('router');
$this->titleResolver = \Drupal::service('title_resolver');
$this->routeMatcher = \Drupal::service('router.matcher');
$this->currentRouteMatch = \Drupal::service('current_route_match');
}