Skip to content

Instantly share code, notes, and snippets.

@hawkeyetwolf
Last active December 22, 2015 16:50
Show Gist options
  • Save hawkeyetwolf/a8a7f2adef601670f07b to your computer and use it in GitHub Desktop.
Save hawkeyetwolf/a8a7f2adef601670f07b to your computer and use it in GitHub Desktop.
Drupal Panels Page 403 Export Code
<?php
$page = new stdClass();
$page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
$page->api_version = 1;
$page->name = 'access_denied';
$page->task = 'page';
$page->admin_title = 'Access Denied (403)';
$page->admin_description = '';
$page->path = 'access-denied';
$page->access = array();
$page->menu = array();
$page->arguments = array();
$page->conf = array(
'admin_paths' => FALSE,
);
$page->default_handlers = array();
$handler = new stdClass();
$handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
$handler->api_version = 1;
$handler->name = 'page_access_denied_panel_context';
$handler->task = 'page';
$handler->subtask = 'access_denied';
$handler->handler = 'panel_context';
$handler->weight = 0;
$handler->conf = array(
'title' => 'Anonymous',
'no_blocks' => 0,
'pipeline' => 'standard',
'body_classes_to_remove' => '',
'body_classes_to_add' => '',
'css_id' => '',
'css' => '',
'contexts' => array(),
'relationships' => array(),
'access' => array(
'plugins' => array(
0 => array(
'name' => 'role',
'settings' => array(
'rids' => array(
0 => 1,
),
),
'context' => 'logged-in-user',
'not' => FALSE,
),
),
'logic' => 'and',
),
);
$display = new panels_display();
$display->layout = 'one';
$display->layout_settings = array();
$display->panel_settings = array(
'style_settings' => array(
'default' => NULL,
'one_main' => NULL,
),
);
$display->cache = array();
$display->title = 'Access denied';
$display->content = array();
$display->panels = array();
$pane = new stdClass();
$pane->pid = 'new-1';
$pane->panel = 'one_main';
$pane->type = 'block';
$pane->subtype = 'user-login';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 1,
'override_title_text' => 'Please log in to continue',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$display->content['new-1'] = $pane;
$display->panels['one_main'][0] = 'new-1';
$display->hide_title = PANELS_TITLE_FIXED;
$display->title_pane = 'new-1';
$handler->conf['display'] = $display;
$page->default_handlers[$handler->name] = $handler;
$handler = new stdClass();
$handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
$handler->api_version = 1;
$handler->name = 'page_access_denied_panel_context_2';
$handler->task = 'page';
$handler->subtask = 'access_denied';
$handler->handler = 'panel_context';
$handler->weight = 1;
$handler->conf = array(
'title' => 'Authenticated',
'no_blocks' => 0,
'pipeline' => 'standard',
'body_classes_to_remove' => '',
'body_classes_to_add' => '',
'css_id' => '',
'css' => '',
'contexts' => array(),
'relationships' => array(),
'access' => array(
'plugins' => array(),
'logic' => 'and',
),
);
$display = new panels_display();
$display->layout = 'one';
$display->layout_settings = array();
$display->panel_settings = array(
'style_settings' => array(
'default' => NULL,
'one_main' => NULL,
),
);
$display->cache = array();
$display->title = 'Access denied';
$display->content = array();
$display->panels = array();
$pane = new stdClass();
$pane->pid = 'new-2';
$pane->panel = 'one_main';
$pane->type = 'custom';
$pane->subtype = 'custom';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'admin_title' => '',
'title' => '',
'body' => 'You are not authorized to access this page.',
'format' => '3',
'substitute' => TRUE,
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$display->content['new-2'] = $pane;
$display->panels['one_main'][0] = 'new-2';
$display->hide_title = PANELS_TITLE_FIXED;
$display->title_pane = 'new-2';
$handler->conf['display'] = $display;
$page->default_handlers[$handler->name] = $handler;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment