You are here

public function PanelizerEntityTaxonomyTerm::hook_default_page_manager_handlers in Panelizer 7.2

Same name and namespace in other branches
  1. 7.3 plugins/entity/PanelizerEntityTaxonomyTerm.class.php \PanelizerEntityTaxonomyTerm::hook_default_page_manager_handlers()

Implements a delegated hook_page_manager_handlers().

This makes sure that all panelized entities have the proper entry in page manager for rendering.

File

plugins/entity/PanelizerEntityTaxonomyTerm.class.php, line 89
Class for the Panelizer taxonomy term entity plugin.

Class

PanelizerEntityTaxonomyTerm
Panelizer Entity taxonomy term plugin class.

Code

public function hook_default_page_manager_handlers(&$handlers) {
  page_manager_get_task('term_view');
  $handler = new stdClass();
  $handler->disabled = FALSE;

  /* Edit this to true to make a default handler disabled initially */
  $handler->api_version = 1;
  $handler->name = 'term_view_panelizer';
  $handler->task = 'term_view';
  $handler->subtask = '';
  $handler->handler = 'panelizer_node';
  $handler->weight = -100;
  $handler->conf = array(
    'title' => t('Term panelizer'),
    'context' => page_manager_term_view_get_type() == 'multiple' ? 'argument_terms_1' : 'argument_term_1',
    'access' => array(),
  );
  $handlers['term_view_panelizer'] = $handler;
  return $handlers;
}