You are here

public function ImportEntity::isRootEntity in Content Synchronizer 8

Same name and namespace in other branches
  1. 8.2 src/Entity/ImportEntity.php \Drupal\content_synchronizer\Entity\ImportEntity::isRootEntity()
  2. 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\Entity

Code

public function isRootEntity($gid) {
  foreach ($this
    ->getRootsEntities() as $rootEntity) {
    if ($rootEntity[ExportEntityWriter::FIELD_GID] == $gid) {
      return TRUE;
    }
  }
  return FALSE;
}