function DisplayPluginBase::acceptAttachments

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::acceptAttachments()
  2. 10 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::acceptAttachments()
  3. 11.x core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::acceptAttachments()

Overrides DisplayPluginInterface::acceptAttachments

File

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

Class

DisplayPluginBase
Base class for views display plugins.

Namespace

Drupal\views\Plugin\views\display

Code

public function acceptAttachments() {
    if (!$this->usesAttachments()) {
        return FALSE;
    }
    if (!empty($this->view->argument) && $this->getOption('hide_attachment_summary')) {
        foreach ($this->view->argument as $argument) {
            if ($argument->needsStylePlugin() && empty($argument->argument_validated)) {
                return FALSE;
            }
        }
    }
    return TRUE;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.