コード例 #1
0
ファイル: HttpFetcher.php プロジェクト: alnutile/drunatra
 /**
  * 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;
 }
コード例 #2
0
ファイル: Periodic.php プロジェクト: alnutile/drunatra
 /**
  * {@inheritdoc}
  */
 public function submitConfigurationForm(array &$form, array &$form_state)
 {
     if (!$this->jobController) {
         return;
     }
     $values =& $form_state['values']['scheduler']['configuration'];
     if ($this->configuration['import_period'] != $values['import_period']) {
         $this->importer->reschedule($this->importer->id());
     }
     // Intentionally call parent last so that we can access our old values.
     parent::submitConfigurationForm($form, $form_state);
 }
コード例 #3
0
ファイル: UploadFetcher.php プロジェクト: alnutile/drunatra
 /**
  * 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;
 }
コード例 #4
0
ファイル: Background.php プロジェクト: alnutile/drunatra
 /**
  * {@inheritdoc}
  */
 public function submitConfigurationForm(array &$form, array &$form_state)
 {
     parent::submitConfigurationForm($form, $form_state);
 }
コード例 #5
0
ファイル: CSVParser.php プロジェクト: alnutile/drunatra
 /**
  * {@inheritdoc}
  */
 public function getSourceElement(FeedInterface $feed, array $item, $element_key)
 {
     return parent::getSourceElement($feed, $item, Unicode::strtolower($element_key));
 }
コード例 #6
0
ファイル: UploadFetcher.php プロジェクト: Tawreh/mtg
 /**
  * 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);
 }
コード例 #7
0
ファイル: EntityProcessor.php プロジェクト: alnutile/drunatra
 /**
  * {@inheritdoc}
  *
  * @todo We need an importer save/update/delete API.
  */
 public function submitConfigurationForm(array &$form, array &$form_state)
 {
     $this->apply(__FUNCTION__, $form, $form_state);
     $values =& $form_state['values']['processor']['configuration'];
     if ($this->configuration['expire'] != $values['expire']) {
         $this->importer->reschedule($this->importer->id());
     }
     parent::submitConfigurationForm($form, $form_state);
     $this->prepareFeedsItemField();
 }