1.20.x view.inc | view::attach_displays() |
Run attachment displays for the view.
File
- modules/
views/ includes/ view.inc, line 1454 - Provides the view object type and associated methods.
Class
- view
- An object to contain all of the data to generate a view, plus the member functions to build the view query, execute the query and render the output.
Code
function attach_displays() {
if (!empty($this->is_attachment)) {
return;
}
if (!$this->display_handler->accept_attachments()) {
return;
}
$this->is_attachment = TRUE;
// Give other displays an opportunity to attach to the view.
foreach ($this->display as $id => $display) {
if (!empty($this->display[$id]->handler)) {
$this->display[$id]->handler->attach_to($this->current_display);
}
}
$this->is_attachment = FALSE;
}