public function WebformContentCreatorEntity::existsEntityType in Webform Content Creator 2.x
Check if the entity type exists.
Return value
bool True, if entity type exists. Otherwise, returns false.
Overrides WebformContentCreatorInterface::existsEntityType
File
- src/
Entity/ WebformContentCreatorEntity.php, line 560
Class
- WebformContentCreatorEntity
- Defines the Webform Content Creator entity.
Namespace
Drupal\webform_content_creator\EntityCode
public function existsEntityType() {
// Get entity type id.
$entity_type_id = $this
->getEntityTypeValue();
$entity_keys = array_keys(\Drupal::entityTypeManager()
->getDefinitions());
return in_array($entity_type_id, $entity_keys);
}