public function EntityReferenceFieldItemListProcessor::__construct in Content Synchronizer 8.2
Same name and namespace in other branches
- 8 src/Plugin/content_synchronizer/type_processor/EntityReferenceFieldItemListProcessor.php \Drupal\content_synchronizer\Plugin\content_synchronizer\type_processor\EntityReferenceFieldItemListProcessor::__construct()
- 3.x src/Plugin/content_synchronizer/type_processor/EntityReferenceFieldItemListProcessor.php \Drupal\content_synchronizer\Plugin\content_synchronizer\type_processor\EntityReferenceFieldItemListProcessor::__construct()
Constructs a \Drupal\Component\Plugin\PluginBase object.
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.
Overrides TypeProcessorBase::__construct
File
- src/
Plugin/ content_synchronizer/ type_processor/ EntityReferenceFieldItemListProcessor.php, line 29
Class
- EntityReferenceFieldItemListProcessor
- Plugin implementation For the type processor .
Namespace
Drupal\content_synchronizer\Plugin\content_synchronizer\type_processorCode
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
// Listen import event.
/** @var \Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher $dispatcher */
$dispatcher = \Drupal::service('event_dispatcher');
$dispatcher
->addListener(ImportEvent::ON_ENTITY_IMPORTER, [
$this,
'onImportedEntity',
]);
}