You are here

public function view::_init_handler in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 includes/view.inc \view::_init_handler()
  2. 6.2 includes/view.inc \view::_init_handler()

Attach all of the handlers for each type.

Parameters

string $key: One of 'argument', 'field', 'sort', 'filter', 'relationship'.

array $info: The $info from views_object_types for this object.

1 call to view::_init_handler()
view::init_handlers in includes/view.inc
Acquire and attach all of the handlers.

File

includes/view.inc, line 798
views_objects Objects that represent a View or part of a view

Class

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

Code

public function _init_handler($key, $info) {

  // Load the requested items from the display onto the object.
  $this->{$key} =& $this->display_handler
    ->get_handlers($key);

  // This reference deals with difficult PHP indirection.
  $handlers =& $this->{$key};

  // Run through and test for accessibility.
  foreach ($handlers as $id => $handler) {
    if (!$handler
      ->access()) {
      unset($handlers[$id]);
    }
  }
}