You are here

public function PanelizerEntityFile::hook_default_page_manager_handlers in File Entity (fieldable files) 7.2

Same name and namespace in other branches
  1. 7.3 plugins/entity/PanelizerEntityFile.class.php \PanelizerEntityFile::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/PanelizerEntityFile.class.php, line 80
Class for the Panelizer file entity plugin.

Class

PanelizerEntityFile
Panelizer Entity file plugin class.

Code

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

  /* Edit this to true to make a default handler disabled initially */
  $handler->api_version = 1;
  $handler->name = 'file_view_panelizer';
  $handler->task = 'file_view';
  $handler->subtask = '';
  $handler->handler = 'panelizer_node';
  $handler->weight = -100;
  $handler->conf = array(
    'title' => t('File panelizer'),
    'context' => 'argument_entity_id:file_1',
    'access' => array(),
  );
  $handlers['file_view_panelizer'] = $handler;
  return $handlers;
}