Issue #2282477 by tim.plunkett: Fixed ViewListBuilder::getDisplaysList() does not handle empty admin strings.
parent
c723131b15
commit
8fd6225e30
|
@ -229,7 +229,7 @@ class ViewListBuilder extends ConfigEntityListBuilder {
|
|||
$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 @@ class ViewListBuilderTest extends UnitTestCase {
|
|||
'title' => 'Master',
|
||||
'theme' => 'views_view',
|
||||
'no_ui' => TRUE,
|
||||
'admin' => '',
|
||||
)
|
||||
),
|
||||
array(
|
||||
|
|
Loading…
Reference in New Issue