protected function EntityProcessorBase::getEntityGlobalReference in Content Synchronizer 8.2
Same name and namespace in other branches
- 8 src/Processors/Entity/EntityProcessorBase.php \Drupal\content_synchronizer\Processors\Entity\EntityProcessorBase::getEntityGlobalReference()
- 3.x src/Processors/Entity/EntityProcessorBase.php \Drupal\content_synchronizer\Processors\Entity\EntityProcessorBase::getEntityGlobalReference()
Get the global reference entity.
Parameters
\Drupal\Core\Entity\EntityInterface $entityToExport: The entity to export.
Return value
string The gid.
1 call to EntityProcessorBase::getEntityGlobalReference()
- EntityProcessorBase::export in src/
Processors/ Entity/ EntityProcessorBase.php - Export the entity and return the gid if exists, else false.
File
- src/
Processors/ Entity/ EntityProcessorBase.php, line 538
Class
- EntityProcessorBase
- The entity processor base.
Namespace
Drupal\content_synchronizer\Processors\EntityCode
protected function getEntityGlobalReference(EntityInterface $entityToExport) {
$gid = $this
->getGlobalReferenceManager()
->getEntityGlobalId($entityToExport);
if (!$gid) {
$gid = $this
->getGlobalReferenceManager()
->createEntityGlobalId($entityToExport);
}
return $gid;
}