/** * Constructs a new Example instance. * * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id * The plugin_id for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Routing\RouteMatchInterface $route_match * The route match. * * @DCG: Optional. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteMatchInterface $route_match) { parent::__construct($configuration, $plugin_id, $plugin_definition); /** * @DCG: { * The Route match service is only needed if you want to extract argument * from the current route. * @DCG: } */ $this->routeMatch = $route_match; }
/** * Constructs a Raw object. * * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id * The plugin_id for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Path\AliasManagerInterface $alias_manager * The alias manager. * @param \Drupal\Core\Path\CurrentPathStack $current_path * The current path. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, AliasManagerInterface $alias_manager, CurrentPathStack $current_path) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->aliasManager = $alias_manager; $this->currentPath = $current_path; }
/** * Constructs a new User instance. * * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id * The plugin_id for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * * @param \Drupal\Core\Routing\RouteMatchInterface $route_match * The route match. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteMatchInterface $route_match) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->routeMatch = $route_match; }
/** * Constructs a new Tid instance. * * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id * The plugin_id for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * * @param \Drupal\Core\Routing\RouteMatchInterface $route_match * The route match. * @param \Drupal\taxonomy\VocabularyStorageInterface $vocabulary_storage * The vocabulary storage. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteMatchInterface $route_match, VocabularyStorageInterface $vocabulary_storage) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->routeMatch = $route_match; $this->vocabularyStorage = $vocabulary_storage; }
/** * Constructs a new Date instance. * * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id * The plugin_id for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter * The date formatter service. * @param \Symfony\Component\HttpFoundation\Request $request * The current request. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, DateFormatterInterface $date_formatter, Request $request) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->dateFormatter = $date_formatter; $this->request = $request; }
/** * Constructs a Raw object. * * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id * The plugin_id for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Path\AliasManagerInterface $alias_manager * The alias manager. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, AliasManagerInterface $alias_manager) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->aliasManager = $alias_manager; }