function context_get_plugin

cis7 context.module context_get_plugin($type = 'condition', $key, $reset = FALSE)
cle7 context.module context_get_plugin($type = 'condition', $key, $reset = FALSE)
elmsmedia7 context.module context_get_plugin($type = 'condition', $key, $reset = FALSE)
icor7 context.module context_get_plugin($type = 'condition', $key, $reset = FALSE)
meedjum_blog7 context.module context_get_plugin($type = 'condition', $key, $reset = FALSE)
mooc7 context.module context_get_plugin($type = 'condition', $key, $reset = FALSE)

Get a plugin handler.

34 calls to context_get_plugin()
context_admin_form_submit in sites/all/modules/ulmus/context/context.core.inc
Clear out block info cache when an admin area form is submitted.
context_condition_map in sites/all/modules/ulmus/context/context.module
Loads an associative array of conditions => context identifiers to allow contexts to be set by different conditions.
context_condition_theme_context_page_condition in sites/all/modules/ulmus/context_condition_theme/context_condition_theme.module
Implementation of hook_context_page_reaction() adds context based on the browser keywords string.
context_context_page_condition in sites/all/modules/ulmus/context/context.core.inc
Implementation of hook_context_page_condition().
context_context_page_reaction in sites/all/modules/ulmus/context/context.core.inc
Implementation of hook_context_page_reaction().

... See full list

1 string reference to 'context_get_plugin'
_regions_blocks in sites/all/modules/elmsln_contrib/regions/regions.module
Helper function to get a list of blocks per region.

File

sites/all/modules/ulmus/context/context.module, line 475

Code

function context_get_plugin($type = 'condition', $key, $reset = FALSE) {
  static $cache = array();
  if (!isset($cache[$type][$key]) || $reset) {
    switch ($type) {
      case 'condition':
        $registry = context_conditions();
        break;
      case 'reaction':
        $registry = context_reactions();
        break;
    }
    if (isset($registry[$key], $registry[$key]['plugin'])) {
      ctools_include('plugins');
      $info = $registry[$key];
      $plugins = ctools_get_plugins('context', 'plugins');
      if (isset($plugins[$info['plugin']]) && $class = ctools_plugin_get_class($plugins[$info['plugin']], 'handler')) {
        // Check that class exists until CTools & registry issues are resolved.
        if (class_exists($class)) {
          $cache[$type][$key] = new $class($key, $info);
        }
      }
    }
  }
  return isset($cache[$type][$key]) ? $cache[$type][$key] : FALSE;
}
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.