Esempio n. 1
0
 /**
  * Constructs an UploadFetcher object.
  *
  * @param array $configuration
  *   The plugin configuration.
  * @param string $plugin_id
  *   The plugin id.
  * @param array $plugin_definition
  *   The plugin definition.
  * @param \Drupal\Core\Queue\QueueInterface $subscribe_queue
  *   The queue to use for subscriptions.
  * @param \Drupal\Core\Queue\QueueInterface $unsubscribe_queue
  *   The queue to use to unsubscribe.
  * @param \Drupal\feeds\PuSH\SubscriptionInterface $subscription
  *   The subscription controller.
  */
 public function __construct(array $configuration, $plugin_id, array $plugin_definition, QueueInterface $subscribe_queue, QueueInterface $unsubscribe_queue, SubscriptionInterface $subscription)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->subscribeQueue = $subscribe_queue;
     $this->unsubscribeQueue = $unsubscribe_queue;
     $this->subscription = $subscription;
 }
Esempio n. 2
0
 /**
  * Constructs a Periodic object.
  *
  * @param array $configuration
  *   The plugin configuration.
  * @param string $plugin_id
  *   The plugin id.
  * @param array $plugin_definition
  *   The plugin definition.
  * @param \Drupal\job_scheduler\JobController $job_controller
  *   (optional) A job_scheduler job controller if the job_scheduler module is
  *   enabled.
  */
 public function __construct(array $configuration, $plugin_id, array $plugin_definition, JobController $job_controller = NULL)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->jobController = $job_controller;
 }
Esempio n. 3
0
 /**
  * Constructs an UploadFetcher object.
  *
  * @param array $configuration
  *   The plugin configuration.
  * @param string $plugin_id
  *   The plugin id.
  * @param \Drupal\file\FileUsage\FileUsageInterface $file_usage
  *   The file usage backend.
  * @param \Drupal\Core\Entity\EntityStorageControllerInterface $file_storage
  *   The file storage controller.
  */
 public function __construct(array $configuration, $plugin_id, array $plugin_definition, FileUsageInterface $file_usage, EntityStorageControllerInterface $file_storage)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->fileUsage = $file_usage;
     $this->fileStorage = $file_storage;
 }
Esempio n. 4
0
 /**
  * Constructs an UploadFetcher object.
  *
  * @param array $configuration
  *   The plugin configuration.
  * @param string $plugin_id
  *   The plugin id.
  * @param array $plugin_definition
  *   The plugin definition.
  * @param \Drupal\file\FileUsage\FileUsageInterface $file_usage
  *   The file usage backend.
  * @param \Drupal\Core\Entity\EntityManagerInterface $file_storage
  *   The file storage controller.
  * @param \Drupal\Component\Uuid\UuidInterface $uuid
  *   The UUID generator.
  * @param \Drupal\Core\StreamWrapper\StreamWrapperManager $stream_wrapper_manager
  *   The stream wrapper manager.
  */
 public function __construct(array $configuration, $plugin_id, array $plugin_definition, FileUsageInterface $file_usage, EntityManagerInterface $entity_manager, UuidInterface $uuid, StreamWrapperManager $stream_wrapper_manager)
 {
     $this->fileUsage = $file_usage;
     $this->fileStorage = $entity_manager->getStorage('file');
     $this->uuid = $uuid;
     $this->streamWrapperManager = $stream_wrapper_manager;
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 }
Esempio n. 5
0
 /**
  * Constructs an EntityProcessor object.
  *
  * @param array $configuration
  *   The plugin configuration.
  * @param string $plugin_id
  *   The plugin id.
  * @param array $plugin_definition
  *   The plugin definition.
  * @param \Drupal\Core\Entity\EntityTypeInterface $entity_info
  *   The entity info.
  * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage_controller
  *   The storage controller for this processor.
  */
 public function __construct(array $configuration, $plugin_id, array $plugin_definition, EntityTypeInterface $entity_info, EntityStorageControllerInterface $storage_controller, QueryFactory $query_factory)
 {
     // $entityInfo has to be assinged before $this->loadHandlers() is called.
     $this->entityInfo = $entity_info;
     $this->storageController = $storage_controller;
     $this->queryFactory = $query_factory;
     $this->pluginDefinition = $plugin_definition;
     $this->loadHandlers($configuration);
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->skipExisting = $this->configuration['update_existing'] == ProcessorInterface::SKIP_EXISTING;
 }