protected function EntitySubmenuBlock::isValidEntity in Entity Submenu Block 8
Filters entities based on their view builder handlers.
Parameters
string $entity_type: The entity type of the entity that needs to be validated.
Return value
bool TRUE if the entity has the correct view builder handler, FALSE if the entity doesn't have the correct view builder handler.
1 call to EntitySubmenuBlock::isValidEntity()
- EntitySubmenuBlock::getEntityTypes in src/
Plugin/ Block/ EntitySubmenuBlock.php - Returns a list of valid entity types.
File
- src/
Plugin/ Block/ EntitySubmenuBlock.php, line 292
Class
- EntitySubmenuBlock
- Provides an Entity Submenu Block.
Namespace
Drupal\entity_submenu_block\Plugin\BlockCode
protected function isValidEntity($entity_type) {
return $this->entityTypes[$entity_type]
->get('field_ui_base_route') && $this->entityTypes[$entity_type]
->hasViewBuilderClass();
}