Guest User

test panel - broken handler

a guest
Dec 21st, 2011
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.97 KB | None | 0 0
  1. <?php
  2.  
  3. $page = new stdClass;
  4. $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
  5. $page->api_version = 1;
  6. $page->name = 'test';
  7. $page->task = 'page';
  8. $page->admin_title = 'test';
  9. $page->admin_description = '';
  10. $page->path = 'test';
  11. $page->access = array();
  12. $page->menu = array();
  13. $page->arguments = array();
  14. $page->conf = array();
  15. $page->default_handlers = array();
  16. $handler = new stdClass;
  17. $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
  18. $handler->api_version = 1;
  19. $handler->name = 'page_test_panel_context';
  20. $handler->task = 'page';
  21. $handler->subtask = 'test';
  22. $handler->handler = 'panel_context';
  23. $handler->weight = 0;
  24. $handler->conf = array(
  25.   'title' => 'Panel',
  26.   'no_blocks' => 0,
  27.   'pipeline' => 'standard',
  28.   'css_id' => '',
  29.   'css' => '',
  30.   'contexts' => array(),
  31.   'relationships' => array(),
  32. );
  33. $display = new panels_display;
  34. $display->layout = 'onecol';
  35. $display->layout_settings = array();
  36. $display->panel_settings = array(
  37.   'style_settings' => array(
  38.     'default' => NULL,
  39.     'middle' => NULL,
  40.   ),
  41. );
  42. $display->cache = array();
  43. $display->title = '';
  44. $display->content = array();
  45. $display->panels = array();
  46.   $pane = new stdClass;
  47.   $pane->pid = 'new-1';
  48.   $pane->panel = 'middle';
  49.   $pane->type = 'views_panes';
  50.   $pane->subtype = 'testview-panel_pane_1';
  51.   $pane->shown = TRUE;
  52.   $pane->access = array();
  53.   $pane->configuration = array(
  54.     'fields_override' => array(
  55.       'field_signature_image_fid' => 1,
  56.       'title' => 1,
  57.     ),
  58.   );
  59.   $pane->cache = array();
  60.   $pane->style = array(
  61.     'settings' => NULL,
  62.   );
  63.   $pane->css = array();
  64.   $pane->extras = array();
  65.   $pane->position = 0;
  66.   $display->content['new-1'] = $pane;
  67.   $display->panels['middle'][0] = 'new-1';
  68. $display->hide_title = PANELS_TITLE_FIXED;
  69. $display->title_pane = 'new-1';
  70. $handler->conf['display'] = $display;
  71. $page->default_handlers[$handler->name] = $handler;
Advertisement
Add Comment
Please, Sign In to add comment