You are here

protected static function ResourceTypeRepository::isLocatableResourceType in JSON:API 8

Same name and namespace in other branches
  1. 8.2 src/ResourceType/ResourceTypeRepository.php \Drupal\jsonapi\ResourceType\ResourceTypeRepository::isLocatableResourceType()

Whether an entity type is a locatable resource type.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type to assess.

Return value

bool TRUE if the entity type is locatable, FALSE otherwise.

1 call to ResourceTypeRepository::isLocatableResourceType()
ResourceTypeRepository::all in src/ResourceType/ResourceTypeRepository.php
Gets all JSON API resource types.

File

src/ResourceType/ResourceTypeRepository.php, line 174

Class

ResourceTypeRepository
Provides a repository of all JSON API resource types.

Namespace

Drupal\jsonapi\ResourceType

Code

protected static function isLocatableResourceType(EntityTypeInterface $entity_type) {
  return $entity_type
    ->getStorageClass() !== ContentEntityNullStorage::class;
}