function views_plugin_display::get_plugin

cis7 views_plugin_display.inc views_plugin_display::get_plugin($type = 'style', $name = NULL)
cle7 views_plugin_display.inc views_plugin_display::get_plugin($type = 'style', $name = NULL)
elmsmedia7 views_plugin_display.inc views_plugin_display::get_plugin($type = 'style', $name = NULL)
icor7 views_plugin_display.inc views_plugin_display::get_plugin($type = 'style', $name = NULL)
meedjum_blog7 views_plugin_display.inc views_plugin_display::get_plugin($type = 'style', $name = NULL)
mooc7 views_plugin_display.inc views_plugin_display::get_plugin($type = 'style', $name = NULL)

Get the instance of a plugin, for example style or row.

Parameters

string $type: The type of the plugin.

string $name: The name of the plugin defined in hook_views_plugins.

Return value

views_plugin|FALSE

17 calls to views_plugin_display::get_plugin()
views_plugin_display::access in sites/all/modules/ulmus/views/plugins/views_plugin_display.inc
Determine if the user has access to this display of the view.
views_plugin_display::export_plugin in sites/all/modules/ulmus/views/plugins/views_plugin_display.inc
Special handling for plugin export
views_plugin_display::export_style in sites/all/modules/ulmus/views/plugins/views_plugin_display.inc
Special handling for the style export.
views_plugin_display::options_form in sites/all/modules/ulmus/views/plugins/views_plugin_display.inc
Provide the default form for setting options.
views_plugin_display::options_submit in sites/all/modules/ulmus/views/plugins/views_plugin_display.inc
Perform any necessary changes to the form values prior to storage. There is no need for this function to actually store the data.

... See full list

File

sites/all/modules/ulmus/views/plugins/views_plugin_display.inc, line 848
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_plugin($type = 'style', $name = NULL) {
  static $cache = array();
  if (!isset($cache[$type][$name])) {
    switch ($type) {
      case 'style':
      case 'row':
        $option_name = $type . '_plugin';
        $options = $this->get_option($type . '_options');
        if (!$name) {
          $name = $this->get_option($option_name);
        }

        break;
      case 'query':
        $views_data = views_fetch_data($this->view->base_table);
        $name = !empty($views_data['table']['base']['query class']) ? $views_data['table']['base']['query class'] : 'views_query';
      default:
        $option_name = $type;
        $options = $this->get_option($type);
        if (!$name) {
          $name = $options['type'];
        }

        // access & cache store their options as siblings with the
        // type; all others use an 'options' array.
        if ($type != 'access' && $type != 'cache') {
          $options = $options['options'];
        }
    }
    $plugin = views_get_plugin($type, $name);

    if (!$plugin) {
      return;
    }
    if ($type != 'query') {
      $plugin->init($this->view, $this->display, $options);
    }
    else {
      $display_id = $this->is_defaulted($option_name) ? $this->display->id : 'default';
      $plugin->localization_keys = array($display_id, $type);

      if (!isset($this->base_field)) {
        $views_data = views_fetch_data($this->view->base_table);
        $this->view->base_field = !empty($views_data['table']['base']['field']) ? $views_data['table']['base']['field'] : '';
      }
      $plugin->init($this->view->base_table, $this->view->base_field, $options);
    }
    $cache[$type][$name] = $plugin;
  }

  return $cache[$type][$name];
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.