You are here

public function DisplayPluginBase::acceptAttachments in Views (for Drupal 7) 8.3

Determines whether this display can use attachments.

Return value

bool

File

lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php, line 335
Definition of Drupal\views\Plugin\views\display\DisplayPluginBase.

Class

DisplayPluginBase
The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.

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_id => $argument) {
      if ($argument
        ->needsStylePlugin() && empty($argument->argument_validated)) {
        return FALSE;
      }
    }
  }
  return TRUE;
}