Skip to content
Snippets Groups Projects
Commit 8fd6225e authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2282477 by tim.plunkett: Fixed ViewListBuilder::getDisplaysList() does...

Issue #2282477 by tim.plunkett: Fixed ViewListBuilder::getDisplaysList() does not handle empty admin strings.
parent c723131b
No related branches found
No related tags found
No related merge requests found
......@@ -229,7 +229,7 @@ protected function getDisplaysList(EntityInterface $view) {
$displays = array();
foreach ($view->get('display') as $display) {
$definition = $this->displayManager->getDefinition($display['display_plugin']);
if (isset($definition['admin'])) {
if (!empty($definition['admin'])) {
// Cast the admin label to a string since it is an object.
// @see \Drupal\Core\StringTranslation\TranslationWrapper
$displays[] = (string) $definition['admin'];
......
......@@ -54,6 +54,7 @@ public function testBuildRowEntityList() {
'title' => 'Master',
'theme' => 'views_view',
'no_ui' => TRUE,
'admin' => '',
)
),
array(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment