protected function ViewListBuilder::getDisplaysList in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views_ui/src/ViewListBuilder.php \Drupal\views_ui\ViewListBuilder::getDisplaysList()
Gets a list of displays included in the view.
Parameters
\Drupal\Core\Entity\EntityInterface $view: The view entity instance to get a list of displays for.
Return value
array An array of display types that this view includes.
1 call to ViewListBuilder::getDisplaysList()
- ViewListBuilder::buildRow in core/
modules/ views_ui/ src/ ViewListBuilder.php - Builds a row for an entity in the entity listing.
File
- core/
modules/ views_ui/ src/ ViewListBuilder.php, line 243 - Contains \Drupal\views_ui\ViewListBuilder.
Class
- ViewListBuilder
- Defines a class to build a listing of view entities.
Namespace
Drupal\views_uiCode
protected function getDisplaysList(EntityInterface $view) {
$displays = array();
foreach ($view
->get('display') as $display) {
$definition = $this->displayManager
->getDefinition($display['display_plugin']);
if (!empty($definition['admin'])) {
// Cast the admin label to a string since it is an object.
// @see \Drupal\Core\StringTranslation\TranslatableMarkup
$displays[] = (string) $definition['admin'];
}
}
sort($displays);
return $displays;
}