You are here

protected function OverridesSectionStorage::hasIntegerId in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php \Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage::hasIntegerId()

Determines if this entity type's ID is stored as an integer.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: An entity type.

Return value

bool TRUE if this entity type's ID key is always an integer, FALSE otherwise.

File

core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php, line 267

Class

OverridesSectionStorage
Defines the 'overrides' section storage type.

Namespace

Drupal\layout_builder\Plugin\SectionStorage

Code

protected function hasIntegerId(EntityTypeInterface $entity_type) {
  $field_storage_definitions = $this->entityFieldManager
    ->getFieldStorageDefinitions($entity_type
    ->id());
  return $field_storage_definitions[$entity_type
    ->getKey('id')]
    ->getType() === 'integer';
}