function NavigationRenderer::isLayoutBuilderEntityType

Same name and namespace in other branches
  1. 10 core/modules/navigation/src/NavigationRenderer.php \Drupal\navigation\NavigationRenderer::isLayoutBuilderEntityType()

Determines if a given entity type is layout builder relevant or not.

Parameters

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

Return value

bool Whether this entity type is a Layout builder candidate or not

See also

\Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage::getEntityTypes()

1 call to NavigationRenderer::isLayoutBuilderEntityType()
NavigationRenderer::getContentEntityTypePaths in core/modules/navigation/src/NavigationRenderer.php
Returns the path for the link template for a given content entity type.

File

core/modules/navigation/src/NavigationRenderer.php, line 354

Class

NavigationRenderer
Handle rendering for different pieces of the navigation.

Namespace

Drupal\navigation

Code

protected function isLayoutBuilderEntityType(EntityTypeInterface $entity_type) : bool {
    return $entity_type->entityClassImplements(FieldableEntityInterface::class) && $entity_type->hasHandlerClass('form', 'layout_builder') && $entity_type->hasViewBuilderClass() && $entity_type->hasLinkTemplate('canonical');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.