public function EntityLoadHelper::entityExists in YAML Content 8
Query if a target entity already exists and should be updated.
Parameters
string $entity_type: The type of entity being imported.
array $content_data: The import content structure representing the entity being searched for.
Return value
\Drupal\Core\Entity\EntityInterface|false Return a matching entity if one is found, or FALSE otherwise.
File
- src/
Service/ EntityLoadHelper.php, line 81
Class
- EntityLoadHelper
- A helper class to support identification and loading of existing entities.
Namespace
Drupal\yaml_content\ServiceCode
public function entityExists($entity_type, array $content_data) {
return (bool) $this
->loadEntity($entity_type, $content_data);
}