Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DisplayPluginBase.php

function DisplayPluginBase::outputIsEmpty

Overrides DisplayPluginInterface::outputIsEmpty

1 call to DisplayPluginBase::outputIsEmpty()
Block::execute in core/modules/views/src/Plugin/views/display/Block.php
The display block handler returns the structure necessary for a block.

File

core/modules/views/src/Plugin/views/display/DisplayPluginBase.php, line 2621

Class

DisplayPluginBase
Base class for views display plugins.

Namespace

Drupal\views\Plugin\views\display

Code

public function outputIsEmpty() {
    if (!empty($this->view->result)) {
        return FALSE;
    }
    // Check whether all of the area handlers are empty.
    foreach ([
        'empty',
        'footer',
        'header',
    ] as $type) {
        $handlers = $this->getHandlers($type);
        foreach ($handlers as $handler) {
            // If one is not empty, return FALSE now.
            if (!$handler->isEmpty()) {
                return FALSE;
            }
        }
    }
    return TRUE;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal