public function DisplayPluginBase::acceptAttachments in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::acceptAttachments()
Determines whether this display can use attachments.
Return value
bool
Overrides DisplayPluginInterface::acceptAttachments
File
- core/
modules/ views/ src/ Plugin/ views/ display/ DisplayPluginBase.php, line 367 - Contains \Drupal\views\Plugin\views\display\DisplayPluginBase.
Class
- DisplayPluginBase
- Base class for views display plugins.
Namespace
Drupal\views\Plugin\views\displayCode
public function acceptAttachments() {
// To be able to accept attachments this display have to be able to use
// attachments but at the same time, you cannot attach a display to itself.
if (!$this
->usesAttachments() || $this->definition['id'] == $this->view->current_display) {
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;
}