You are here

public function ExportEntity::hasEntity in Content Synchronizer 3.x

Same name and namespace in other branches
  1. 8.2 src/Entity/ExportEntity.php \Drupal\content_synchronizer\Entity\ExportEntity::hasEntity()
  2. 8 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\EntityInterface $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 247

Class

ExportEntity
Defines the Export entity entity.

Namespace

Drupal\content_synchronizer\Entity

Code

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