Example #1
0
 /**
  * Construct a new entity.
  *
  * @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 MigrationInterface $migration
  *   The migration.
  * @param EntityStorageInterface $storage
  *   The storage for this entity type.
  * @param array $bundles
  *   The list of bundles this entity type has.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
     $this->storage = $storage;
     $this->bundles = $bundles;
     $this->supportsRollback = TRUE;
 }
 /**
  * {@inheritdoc}
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
     $this->table_name = $this->configuration['table_name'];
     $this->fields_list = $this->configuration['fields_list'];
     if (!empty($this->configuration['ids'])) {
         $this->ids = $this->configuration['ids'];
     }
 }
Example #3
0
 /**
  * Constructor.
  *
  * @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 MigrationInterface $migration
  *   The migration.
  * @param EntityManagerInterface $entity_manager
  *   The entity manager.
  * @param KeyValueExpirableFactoryInterface $temp_store_factory
  *   The temp store factory.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityManagerInterface $entity_manager, KeyValueExpirableFactoryInterface $temp_store_factory)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
     list($entity_type_id) = explode('__', $migration->id());
     $entity_type = $entity_manager->getDefinition($entity_type_id);
     $this->entityTypeId = $entity_type_id;
     $this->entityIdKey = $entity_type->getKey('id');
     $this->tempStore = $temp_store_factory->get('multiversion_migration_' . $this->entityTypeId);
 }
Example #4
0
 /**
  * Constructs an entity destination 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 MigrationInterface $migration
  *   The migration.
  * @param \Drupal\shortcut\ShortcutSetStorageInterface $shortcut_set_storage
  *   The shortcut_set entity storage handler.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, ShortcutSetStorageInterface $shortcut_set_storage)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
     $this->shortcutSetStorage = $shortcut_set_storage;
 }
Example #5
0
 /**
  * Constructs an entity destination 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 MigrationInterface $migration
  *   The migration.
  * @param \Drupal\Core\Path\AliasStorage $alias_storage
  *   The alias storage service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, AliasStorage $alias_storage)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
     $this->aliasStorage = $alias_storage;
 }
Example #6
0
 /**
  * Constructs a Config destination 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\migrate\Entity\MigrationInterface $migration
  *   The migration entity.
  * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
  *   The configuration factory.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, ConfigFactoryInterface $config_factory)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
     $this->config = $config_factory->getEditable($configuration['config_name']);
 }
 /**
  * Constructs a Config destination 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\migrate\Entity\MigrationInterface $migration
  *   The migration entity.
  * @param \Drupal\Core\Config\Config $config
  *   The configuration object.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, ConfigObject $config)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
     $this->config = $config;
 }
Example #8
0
 /**
  * Builds an user data entity destination.
  *
  * @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\migrate\Plugin\MigrationInterface $migration
  *   The migration.
  * @param \Drupal\user\UserData $user_data
  *   The user data service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, UserDataStorage $user_data)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
     $this->userData = $user_data;
 }
Example #9
0
 /**
  * Constructs a BlockedIP object.
  *
  * @param array $configuration
  *  Plugin configuration.
  * @param string $plugin_id
  *  The plugin ID.
  * @param mixed $plugin_definition
  *  The plugin definiiton.
  * @param \Drupal\migrate\Entity\MigrationInterface $migration
  *  The current migration.
  * @param \Drupal\ban\BanIpManagerInterface $ban_manager
  *  The IP manager service.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, BanIpManagerInterface $ban_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
     $this->banManager = $ban_manager;
 }
Example #10
0
 /**
  * Constructs Disqus comments destination 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 implemetation definition.
  * @param \Drupal\migrate\Entity\MigrationInterface $migration
  *   The migration.
  * @param \Psr\Log\LoggerInterface $logger
  *   A logger instance.
  * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
  *   The config factory.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, LoggerInterface $logger, ConfigFactoryInterface $config_factory)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
     $this->logger = $logger;
     $this->config = $config_factory->get('disqus.settings');
 }