/**
  * Constructs a PageRedirect 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\Logger\LoggerChannelFactoryInterface $logger_factory
  *   The logger factory service.
  * @param \Drupal\Core\Path\CurrentPathStack $current_path_stack
  *   The current path stack service.
  * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
  *   The request stack service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, LoggerChannelFactoryInterface $logger_factory, CurrentPathStack $current_path_stack, RequestStack $request_stack)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->logger = $logger_factory->get('rules');
     $this->currentPathStack = $current_path_stack;
     $this->request = $request_stack->getCurrentRequest();
 }
示例#2
0
 /**
  * Constructs an EntityCreate 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\Entity\EntityStorageInterface $storage
  *   The entity storage service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityStorageInterface $storage)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->storage = $storage;
     $this->entityTypeId = $plugin_definition['entity_type_id'];
     $this->bundleKey = $plugin_definition['bundle_key'];
 }
 /**
  * Constructs a PathAliasDeleteByPath 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\AliasStorageInterface $alias_storage
  *   The alias storage service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, AliasStorageInterface $alias_storage)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->aliasStorage = $alias_storage;
 }
示例#4
0
 /**
  * Constructs a SendEmail 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 \Psr\Log\LoggerInterface $logger
  *   The alias storage service.
  * @param \Drupal\Core\Mail\MailManagerInterface $mail_manager
  *   The mail manager service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, LoggerInterface $logger, MailManagerInterface $mail_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->logger = $logger;
     $this->mailManager = $mail_manager;
 }
 /**
  * Constructs an EntityPathAliasCreate 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\AliasStorageInterface $alias_storage
  *   The alias storage service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, AliasStorageInterface $alias_storage)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->aliasStorage = $alias_storage;
     $this->entityTypeId = $plugin_definition['entity_type_id'];
 }
示例#6
0
 /**
  * Constructs a TestLogAction 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\rules\Logger\RulesLoggerChannel $logger
  *   Rules logger object.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, RulesLoggerChannel $logger)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->logger = $logger;
 }
示例#7
0
 /**
  * Constructs the BanIP 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\ban\BanIpManagerInterface $ban_manager
  *   The ban manager.
  * @param \Symfony\Component\HttpFoundation\Request $request
  *   The corresponding request.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, BanIpManagerInterface $ban_manager, Request $request)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->banManager = $ban_manager;
     $this->request = $request;
 }
示例#8
0
 /**
  * Constructs a EntityFetchById 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\Entity\EntityTypeManagerInterface $entity_type_manager
  *   The entity type manager service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->entityTypeManager = $entity_type_manager;
 }
 /**
  * Constructs an EntityCreate 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\Entity\EntityStorageInterface $storage
  *   The entity storage service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityStorageInterface $storage)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->storage = $storage;
     $this->componentId = $plugin_definition['component_id'];
 }
示例#10
0
 /**
  * Constructs a UserBlock 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\Session\SessionManagerInterface $session_manager
  *   The session manager service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, SessionManagerInterface $session_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->sessionManager = $session_manager;
 }