public function EntityReferenceFieldItemListProcessor::onImportedEntity 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::onImportedEntity()
- 3.x src/Plugin/content_synchronizer/type_processor/EntityReferenceFieldItemListProcessor.php \Drupal\content_synchronizer\Plugin\content_synchronizer\type_processor\EntityReferenceFieldItemListProcessor::onImportedEntity()
Action on Entity import end.
Parameters
\Drupal\content_synchronizer\Events\ImportEvent $event: The event.
File
- src/
Plugin/ content_synchronizer/ type_processor/ EntityReferenceFieldItemListProcessor.php, line 146
Class
- EntityReferenceFieldItemListProcessor
- Plugin implementation For the type processor .
Namespace
Drupal\content_synchronizer\Plugin\content_synchronizer\type_processorCode
public function onImportedEntity(ImportEvent $event) {
$gid = $event
->getGid();
$entity = $event
->getEntity();
if (array_key_exists($gid, self::$dependenciesBuffer)) {
foreach (self::$dependenciesBuffer[$gid] as $parent) {
$parent['field'][$parent['order']] = $entity;
}
}
}