/**
  * Constructs a RequestPath condition plugin.
  *
  * @param \Drupal\Core\Path\AliasManagerInterface $alias_manager
  *   An alias manager to find the alias for the current system path.
  * @param \Drupal\Core\Path\PathMatcherInterface $path_matcher
  *   The path matcher service.
  * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
  *   The request stack.
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param array $plugin_definition
  *   The plugin implementation definition.
  */
 public function __construct(AliasManagerInterface $alias_manager, PathMatcherInterface $path_matcher, RequestStack $request_stack, array $configuration, $plugin_id, array $plugin_definition)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->aliasManager = $alias_manager;
     $this->pathMatcher = $path_matcher;
     $this->requestStack = $request_stack;
 }
 /**
  * Constructs a CurrentThemeCondition condition plugin.
  *
  * @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\Theme\ThemeNegotiatorInterface $theme_negotiator
  *   The theme negotiator.
  * @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler
  *   The theme handler.
  * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
  *   The current route match.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, ThemeNegotiatorInterface $theme_negotiator, ThemeHandlerInterface $theme_handler, RouteMatchInterface $route_match)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->themeNegotiator = $theme_negotiator;
     $this->themeHandler = $theme_handler;
     $this->routeMatch = $route_match;
 }
示例#3
0
 /**
  * Creates a new NodeType instance.
  *
  * @param EntityManagerInterface $entity_manager
  *   The entity manager.
  * @param array $configuration
  *   The plugin configuration, i.e. an array with configuration values keyed
  *   by configuration option name. The special key 'context' may be used to
  *   initialize the defined contexts by setting it to an array of context
  *   values keyed by context names.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  */
 public function __construct(EntityManagerInterface $entity_manager, array $configuration, $plugin_id, $plugin_definition)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->entityStorage = $entity_manager->getStorage($this->getDerivativeId());
     $this->bundleType = $entity_manager->getDefinition($this->getDerivativeId());
     $this->bundleOf = $entity_manager->getDefinition($this->bundleType->getBundleOf());
 }
示例#4
0
 /**
  * Creates a new instance of the condition.
  *
  * @param \Drupal\Core\Entity\EntityStorageInterface $entity_storage
  *   The entity storage.
  * @param \Drupal\Core\Block\BlockManager $block_manager
  *   The block plugin manager.
  * @param \Drupal\Core\Session\AccountProxyInterface $current_user
  *   The currently logged in user.
  * @param \Drupal\facets\FacetManager\DefaultFacetManager $facet_manager
  *   The default facet manager class.
  * @param array $configuration
  *   The plugin configuration, an array with configuration values keyed by
  *   configuration option name. The special key 'context' may be used to
  *   initialize the defined contexts by setting it to an array of context
  *   values keyed by context names.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  */
 public function __construct(EntityStorageInterface $entity_storage, BlockManager $block_manager, AccountProxyInterface $current_user, DefaultFacetManager $facet_manager, array $configuration, $plugin_id, $plugin_definition)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->facetStorage = $entity_storage;
     $this->blockManager = $block_manager;
     $this->currentUser = $current_user;
     $this->facetManager = $facet_manager;
 }
 /**
  * Creates a new NodeType instance.
  *
  * @param \Drupal\Core\Entity\EntityStorageInterface $entity_storage
  *   The entity storage.
  * @param array $configuration
  *   The plugin configuration, i.e. an array with configuration values keyed
  *   by configuration option name. The special key 'context' may be used to
  *   initialize the defined contexts by setting it to an array of context
  *   values keyed by context names.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  */
 public function __construct(EntityStorageInterface $entity_storage, array $configuration, $plugin_id, $plugin_definition)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->entityStorage = $entity_storage;
 }
示例#6
0
 /**
  * Creates a new EntityBundle instance.
  *
  * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
  *   The entity type manager.
  * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info
  *   The entity type bundle info service.
  * @param array $configuration
  *   The plugin configuration, i.e. an array with configuration values keyed
  *   by configuration option name. The special key 'context' may be used to
  *   initialize the defined contexts by setting it to an array of context
  *   values keyed by context names.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  */
 public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, array $configuration, $plugin_id, $plugin_definition)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->entityTypeBundleInfo = $entity_type_bundle_info;
     $this->bundleOf = $entity_type_manager->getDefinition($this->getDerivativeId());
 }
 /**
  * Creates a new Example instance.
  *
  * @param DateFormatterInterface $date_formatter
  *   The date formatter.
  * @param array $configuration
  *   The plugin configuration, i.e. an array with configuration values keyed
  *   by configuration option name. The special key 'context' may be used to
  *   initialize the defined contexts by setting it to an array of context
  *   values keyed by context names.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  */
 public function __construct(DateFormatterInterface $date_formatter, array $configuration, $plugin_id, $plugin_definition)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->dateFormatter = $date_formatter;
 }
示例#8
0
 /**
  * Creates a new Language instance.
  *
  * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
  *   The language manager.
  * @param array $configuration
  *   The plugin configuration, i.e. an array with configuration values keyed
  *   by configuration option name. The special key 'context' may be used to
  *   initialize the defined contexts by setting it to an array of context
  *   values keyed by context names.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  */
 public function __construct(LanguageManagerInterface $language_manager, array $configuration, $plugin_id, $plugin_definition)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->languageManager = $language_manager;
 }
示例#9
0
 /**
  *
  */
 public function __construct(EntityStorageInterface $entity_storage, ExecutableManagerInterface $manager, Request $request, GroupEvaluator $group_evaluator, array $configuration, $plugin_id, $plugin_definition) {
   // TODO: Change the autogenerated stub.
   parent::__construct($configuration, $plugin_id, $plugin_definition);
   $this->manager = $manager;
   $this->entityStorage = $entity_storage;
   $this->request = $request;
   $this->groupEvaluator = $group_evaluator;
 }
示例#10
0
 /**
  * Constructs a CurrentThemeCondition condition plugin.
  *
  * @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\Theme\ThemeManagerInterface $theme_manager
  *   The theme manager.
  * @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler
  *   The theme handler.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, ThemeManagerInterface $theme_manager, ThemeHandlerInterface $theme_handler)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->themeManager = $theme_manager;
     $this->themeHandler = $theme_handler;
 }
示例#11
0
 public function __construct(RequestStack $requestStack, array $configuration, $plugin_id, $plugin_definition)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->requestStack = $requestStack;
 }
 /**
  * Creates a new ExampleCondition instance.
  *
  * @param array $configuration
  *   The plugin configuration, i.e. an array with configuration values keyed
  *   by configuration option name. The special key 'context' may be used to
  *   initialize the defined contexts by setting it to an array of context
  *   values keyed by context names.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 }