public function ComponentEntityDisplayBase::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/modules/migrate/src/Plugin/migrate/destination/ComponentEntityDisplayBase.php \Drupal\migrate\Plugin\migrate\destination\ComponentEntityDisplayBase::__construct()
- 10 core/modules/migrate/src/Plugin/migrate/destination/ComponentEntityDisplayBase.php \Drupal\migrate\Plugin\migrate\destination\ComponentEntityDisplayBase::__construct()
PerComponentEntityDisplay constructor.
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.
\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository service.
Overrides DestinationBase::__construct
2 methods override ComponentEntityDisplayBase::__construct()
- TestPerComponentEntityDisplay::__construct in core/
modules/ migrate/ tests/ src/ Unit/ destination/ PerComponentEntityDisplayTest.php - PerComponentEntityDisplay constructor.
- TestPerComponentEntityFormDisplay::__construct in core/
modules/ migrate/ tests/ src/ Unit/ destination/ PerComponentEntityFormDisplayTest.php - PerComponentEntityDisplay constructor.
File
- core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ ComponentEntityDisplayBase.php, line 46
Class
- ComponentEntityDisplayBase
- Provides a destination plugin for migrating entity display components.
Namespace
Drupal\migrate\Plugin\migrate\destinationCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityDisplayRepositoryInterface $entity_display_repository = NULL) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
if (!$entity_display_repository) {
@trigger_error('The entity_display.repository service must be passed to PerComponentEntityDisplay::__construct(), it is required before Drupal 9.0.0. See https://www.drupal.org/node/2835616.', E_USER_DEPRECATED);
$entity_display_repository = \Drupal::service('entity_display.repository');
}
$this->entityDisplayRepository = $entity_display_repository;
}