/** * {@inheritdoc} */ public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles, EntityManagerInterface $entity_manager, StreamWrapperManagerInterface $stream_wrappers, FileSystemInterface $file_system) { $configuration += array('source_base_path' => '', 'source_path_property' => 'filepath', 'destination_path_property' => 'uri', 'move' => FALSE, 'urlencode' => FALSE); parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage, $bundles, $entity_manager); $this->streamWrapperManager = $stream_wrappers; $this->fileSystem = $file_system; }
/** * Builds an user 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 MigrationInterface $migration * The migration. * @param EntityStorageInterface $storage * The storage for this entity type. * @param array $bundles * The list of bundles this entity type has. * @param \Drupal\migrate\Plugin\MigratePluginManager $plugin_manager * The migrate plugin manager. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager service. * @param \Drupal\Core\Password\PasswordInterface $password * The password service. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles, EntityManagerInterface $entity_manager, PasswordInterface $password) { parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage, $bundles, $entity_manager); if (isset($configuration['md5_passwords'])) { $this->password = $password; } }
/** * Builds an user 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 MigrationInterface $migration * The migration. * @param EntityStorageInterface $storage * The storage for this entity type. * @param array $bundles * The list of bundles this entity type has. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager service. * @param \Drupal\Core\Password\PasswordInterface $password * The password service. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles, EntityManagerInterface $entity_manager, FieldTypePluginManagerInterface $field_type_manager, PasswordInterface $password) { parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage, $bundles, $entity_manager, $field_type_manager); // Since password records from the earlier schema already was hashed we // disable hashing so that passwords stay intact. $this->password = $password; $this->password->disablePasswordHashing(); $this->storage->resetCache(); }
/** * Builds an comment 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 MigrationInterface $migration * The migration. * @param EntityStorageInterface $storage * The storage for this entity type. * @param array $bundles * The list of bundles this entity type has. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager service. * @param \Drupal\Core\State\StateInterface $state * The state storage object. * @param \Drupal\Core\Entity\Query\QueryFactory $entity_query * The query object that can query the given entity type. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles, EntityManagerInterface $entity_manager, StateInterface $state, QueryFactory $entity_query) { parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage, $bundles, $entity_manager); $this->state = $state; $this->entityQuery = $entity_query; }
/** * {@inheritdoc} */ public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles, EntityManagerInterface $entity_manager) { $configuration += array('source_base_path' => '', 'source_path_property' => 'filepath', 'destination_path_property' => 'uri', 'move' => FALSE, 'urlencode' => FALSE); parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage, $bundles, $entity_manager); }
/** * Builds an user 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 EntityStorageInterface $storage * The storage for this entity type. * @param array $bundles * The list of bundles this entity type has. * @param \Drupal\migrate\Plugin\MigratePluginManager $plugin_manager * The migrate plugin manager. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager service. * @param \Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager * The field type plugin manager service. * @param \Drupal\Core\Password\PasswordInterface $password * The password service. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles, EntityManagerInterface $entity_manager, FieldTypePluginManagerInterface $field_type_manager, PasswordInterface $password) { parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage, $bundles, $entity_manager, $field_type_manager); $this->password = $password; }
/** * Builds an comment 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 MigrationInterface $migration * The migration. * @param EntityStorageInterface $storage * The storage for this entity type. * @param array $bundles * The list of bundles this entity type has. * @param \Drupal\migrate\Plugin\MigratePluginManager $plugin_manager * The migrate plugin manager. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager service. * @param \Drupal\Core\State\StateInterface $state * The state storage object. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles, MigratePluginManager $plugin_manager, EntityManagerInterface $entity_manager, StateInterface $state) { parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage, $bundles, $plugin_manager, $entity_manager); $this->state = $state; }