예제 #1
0
 public function __construct(array $configuration, $plugin_id, $plugin_definition, TranslationInterface $translator, LoggerInterface $log)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $translator, $log);
     foreach ($configuration['globals'] as $variable => $replacement) {
         $this->targets['global $' . $variable . ';'] = '$' . $variable . ' = ' . $replacement . ';';
         $this->targets['$GLOBALS[\'' . $variable . '\']'] = $replacement;
         $this->targets['$GLOBALS["' . $variable . '"]'] = $replacement;
     }
     foreach ($configuration['constants'] as $constant => $replacement) {
         $this->targets[$constant] = $replacement;
     }
 }
예제 #2
0
 /**
  * Constructs a Routing object.
  *
  * @param array $configuration
  *   Additional configuration for the plugin.
  * @param string $plugin_id
  *   The plugin ID, will be "Links".
  * @param mixed $plugin_definition
  *   The plugin definition as derived from the annotations.
  *
  * @param PluginManagerInterface $route_converters
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, TranslationInterface $translator, LoggerInterface $log, PluginManagerInterface $route_converters)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $translator, $log);
     $this->routeConverters = $route_converters;
 }
예제 #3
0
 public function __construct(array $configuration, $plugin_id, $plugin_definition, TranslationInterface $translator, LoggerInterface $log, RewriterInterface $rewriter)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $translator, $log);
     $this->rewriter = $rewriter;
 }
예제 #4
0
 /**
  * Constructs a Links object.
  *
  * @param array $configuration
  *   Additional configuration for the plugin.
  * @param string $plugin_id
  *   The plugin ID, will be "Links".
  * @param string $plugin_definition
  *   The plugin definition as derived from the annotations.
  * @param \Drupal\Component\Plugin\PluginManagerInterface $route_converters
  *  The plugin manager for route converters, used by HookMenu.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, TranslationInterface $translator, LoggerInterface $log, PluginManagerInterface $route_converters, LinkBindingFactory $link_binding)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $translator, $log);
     $this->routeConverters = $route_converters;
     $this->linkBinding = $link_binding;
 }
 /**
  * Constructs a RouteConverterBase object.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, TranslationInterface $translator, LoggerInterface $log, RouteProviderInterface $route_provider, PluginManagerInterface $rewriters)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $translator, $log);
     $this->routeProvider = $route_provider;
     $this->rewriters = $rewriters;
 }