function views_plugin_display::get_handlers

3.x views_plugin_display.inc views_plugin_display::get_handlers($type)
2.x views_plugin_display.inc views_plugin_display::get_handlers($type)

Get a full array of handlers for $type. This caches them.

5 calls to views_plugin_display::get_handlers()
views_plugin_display::get_field_labels in plugins/views_plugin_display.inc
Retrieve a list of fields for the current display with the relationship associated if it exists.
views_plugin_display::get_handler in plugins/views_plugin_display.inc
Get the handler object for a single handler.
views_plugin_display::is_identifier_unique in plugins/views_plugin_display.inc
Check if the provided identifier is unique.
views_plugin_display::options_form in plugins/views_plugin_display.inc
Provide the default form for setting options.
views_plugin_display::validate in plugins/views_plugin_display.inc
Make sure the display and all associated handlers are valid.

File

plugins/views_plugin_display.inc, line 568
Contains the base display plugin.

Class

views_plugin_display
The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.

Code

function get_handlers($type) {
  if (!isset($this->handlers[$type])) {
    $this->handlers[$type] = array();
    $types = views_object_types();
    $plural = $types[$type]['plural'];
    foreach ($this->get_option($plural) as $id => $info) {
      if ($info['id'] != $id) {
        $info['id'] = $id;
      }

      $handler = views_get_handler($info['table'], $info['field'], $type);
      if ($handler) {
        $handler->init($this->view, $info);
        $this->handlers[$type][$id] = &$handler;
      }

      // Prevent reference problems.
      unset($handler);
    }
  }

  return $this->handlers[$type];
}