Issue #2282477 by tim.plunkett: Fixed ViewListBuilder::getDisplaysList() does not handle empty admin strings.

8.0.x
Alex Pott 2014-06-11 23:34:42 +01:00
parent c723131b15
commit 8fd6225e30
2 changed files with 2 additions and 1 deletions

View File

@ -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'];

View File

@ -54,6 +54,7 @@ class ViewListBuilderTest extends UnitTestCase {
'title' => 'Master',
'theme' => 'views_view',
'no_ui' => TRUE,
'admin' => '',
)
),
array(