You are here

protected function ViewExecutable::_initHandler in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::_initHandler()

Attach all of the handlers for each type.

Parameters

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

$info: The $info from getHandlerTypes for this object.

1 call to ViewExecutable::_initHandler()
ViewExecutable::initHandlers in core/modules/views/src/ViewExecutable.php
Acquire and attach all of the handlers.

File

core/modules/views/src/ViewExecutable.php, line 961
Contains \Drupal\views\ViewExecutable.

Class

ViewExecutable
Represents a view as a whole.

Namespace

Drupal\views

Code

protected function _initHandler($key, $info) {

  // Load the requested items from the display onto the object.
  $this->{$key} =& $this->display_handler
    ->getHandlers($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($this->user)) {
      unset($handlers[$id]);
    }
  }
}