function view::attach_displays

Same name in other branches
  1. 6.x-3.x includes/view.inc \view::attach_displays()

Run attachment displays for the view.

1 call to view::attach_displays()
view::build in includes/view.inc
Build the query for the view.

File

includes/view.inc, line 1488

Class

view
An object to contain all of the data to generate a view.

Code

public 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;
}