public function ImportEntity::isRootEntity in Content Synchronizer 8
Same name and namespace in other branches
- 8.2 src/Entity/ImportEntity.php \Drupal\content_synchronizer\Entity\ImportEntity::isRootEntity()
- 3.x src/Entity/ImportEntity.php \Drupal\content_synchronizer\Entity\ImportEntity::isRootEntity()
Check if the entity is a root entity.
Parameters
string $gid: The gid of the entity to check.
Return value
bool The root status.
File
- src/
Entity/ ImportEntity.php, line 335
Class
- ImportEntity
- Defines the Import entity.
Namespace
Drupal\content_synchronizer\EntityCode
public function isRootEntity($gid) {
foreach ($this
->getRootsEntities() as $rootEntity) {
if ($rootEntity[ExportEntityWriter::FIELD_GID] == $gid) {
return TRUE;
}
}
return FALSE;
}