You are here

protected function EntityDisplayModeListBuilder::isValidEntity in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/field_ui/src/EntityDisplayModeListBuilder.php \Drupal\field_ui\EntityDisplayModeListBuilder::isValidEntity()

Filters entities based on their view builder handlers.

Parameters

$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 EntityDisplayModeListBuilder::isValidEntity()
EntityDisplayModeListBuilder::render in core/modules/field_ui/src/EntityDisplayModeListBuilder.php
Builds the entity listing as renderable array for table.html.twig.
1 method overrides EntityDisplayModeListBuilder::isValidEntity()
EntityFormModeListBuilder::isValidEntity in core/modules/field_ui/src/EntityFormModeListBuilder.php
Filters entities based on their form mode handlers.

File

core/modules/field_ui/src/EntityDisplayModeListBuilder.php, line 139

Class

EntityDisplayModeListBuilder
Defines a class to build a listing of view mode entities.

Namespace

Drupal\field_ui

Code

protected function isValidEntity($entity_type) {
  return $this->entityTypes[$entity_type]
    ->get('field_ui_base_route') && $this->entityTypes[$entity_type]
    ->hasViewBuilderClass();
}