Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ViewExecutable.php

function ViewExecutable::_initHandler

Attaches the views handler for the specific type.

Parameters

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

array $info: An array of views handler types use in the view with additional information about them.

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

File

core/modules/views/src/ViewExecutable.php, line 1098

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]);
        }
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal