function EntityContentBase::__construct
Same name in other branches
- 8.9.x core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php \Drupal\migrate\Plugin\migrate\destination\EntityContentBase::__construct()
- 10 core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php \Drupal\migrate\Plugin\migrate\destination\EntityContentBase::__construct()
- 11.x core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php \Drupal\migrate\Plugin\migrate\destination\EntityContentBase::__construct()
Constructs a content entity.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin ID for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\migrate\Plugin\MigrationInterface $migration: The migration entity.
\Drupal\Core\Entity\EntityStorageInterface $storage: The storage for this entity type.
array $bundles: The list of bundles this entity type has.
\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager.
\Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager: The field type plugin manager service.
\Drupal\Core\Session\AccountSwitcherInterface $account_switcher: The account switcher service.
Overrides Entity::__construct
3 calls to EntityContentBase::__construct()
- EntityComment::__construct in core/
modules/ comment/ src/ Plugin/ migrate/ destination/ EntityComment.php - Builds a comment entity destination.
- EntityRevision::__construct in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityRevision.php - Constructs a content entity.
- EntityUser::__construct in core/
modules/ user/ src/ Plugin/ migrate/ destination/ EntityUser.php - Builds a user entity destination.
3 methods override EntityContentBase::__construct()
- EntityComment::__construct in core/
modules/ comment/ src/ Plugin/ migrate/ destination/ EntityComment.php - Builds a comment entity destination.
- EntityRevision::__construct in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityRevision.php - Constructs a content entity.
- EntityUser::__construct in core/
modules/ user/ src/ Plugin/ migrate/ destination/ EntityUser.php - Builds a user entity destination.
File
-
core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentBase.php, line 132
Class
- EntityContentBase
- Provides destination class for all content entities lacking a specific class.
Namespace
Drupal\migrate\Plugin\migrate\destinationCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles, EntityFieldManagerInterface $entity_field_manager, FieldTypePluginManagerInterface $field_type_manager, AccountSwitcherInterface $account_switcher = NULL) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage, $bundles);
$this->entityFieldManager = $entity_field_manager;
$this->fieldTypeManager = $field_type_manager;
if ($account_switcher === NULL) {
@trigger_error('Calling ' . __NAMESPACE__ . '\\EntityContentBase::__construct() without the $account_switcher argument is deprecated in drupal:9.3.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3142975', E_USER_DEPRECATED);
$account_switcher = \Drupal::service('account_switcher');
}
$this->accountSwitcher = $account_switcher;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.