You are here

public function ExportEntity::hasEntity in Content Synchronizer 8

Same name and namespace in other branches
  1. 8.2 src/Entity/ExportEntity.php \Drupal\content_synchronizer\Entity\ExportEntity::hasEntity()
  2. 3.x src/Entity/ExportEntity.php \Drupal\content_synchronizer\Entity\ExportEntity::hasEntity()

Check if hte passed entity is already in the entities list.

Parameters

\Drupal\Core\Entity\Entity $entity: The entity to check.

1 call to ExportEntity::hasEntity()
ExportEntity::addEntity in src/Entity/ExportEntity.php
Add entity to the export entities list.

File

src/Entity/ExportEntity.php, line 242

Class

ExportEntity
Defines the Export entity entity.

Namespace

Drupal\content_synchronizer\Entity

Code

public function hasEntity(Entity $entity) {
  return array_key_exists($entity
    ->getEntityTypeId() . '_' . $entity
    ->id(), $this
    ->getEntitiesList());
}