diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php index 2aaef05..b302861 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php @@ -107,7 +107,7 @@ public function preRender(array $results) { public abstract function render($empty = FALSE); /** - * Is the area empty. + * Does that area have nothing to show. * * This method should be overridden by more complex handlers where the output * is not static and maybe itself be empty if it's rendered. diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php index 8b04d0b..4ba32d8 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php @@ -2724,7 +2724,7 @@ public function isIdentifierUnique($id, $identifier) { } /** - * Does the view shows anything. + * Is the output of the view empty. * * If a view has no result and neither the empty, nor the footer nor the header * does show anything return FALSE. @@ -2738,8 +2738,7 @@ public function outputIsEmpty() { } $empty = TRUE; // Check whether any of the area handlers aren't empty. - $area_types = array('empty', 'footer', 'header'); - foreach ($area_types as $type) { + foreach (array('empty', 'footer', 'header') as $type) { $handlers = $this->getHandlers($type); foreach ($handlers as $handler) { $empty &= $handler->isEmpty(); diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php index 3c59455..320c95b 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php @@ -7,6 +7,7 @@ namespace Drupal\views\Tests\Plugin; +use Drupal\views\Views; use Drupal\views_test_data\Plugin\views\display\DisplayTest as DisplayTestPlugin; /** @@ -277,7 +278,7 @@ public function testInvalidDisplayPlugins() { * Tests the outputIsEmpty method on the display. */ public function testOutputIsEmpty() { - $view = views_get_view('test_display_empty'); + $view = Views::getView('test_display_empty'); $this->executeView($view); $this->assertTrue(count($view->result) > 0, 'Ensure the result of the view is not empty.'); $this->assertFalse($view->display_handler->outputIsEmpty(), 'Ensure the view output is marked as not empty.');