You are here

function page_manager_page_form_access in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 page_manager/plugins/tasks/page.admin.inc \page_manager_page_form_access()

Form to handle menu item controls.

2 string references to 'page_manager_page_form_access'
page_manager_page_add_subtask in page_manager/plugins/tasks/page.admin.inc
Page callback to add a subtask.
page_manager_page_build_subtask in page_manager/plugins/tasks/page.inc
Build a subtask array for a given page.

File

page_manager/plugins/tasks/page.admin.inc, line 828
Administrative functions for the page subtasks.

Code

function page_manager_page_form_access(&$form, &$form_state) {
  ctools_include('context');
  $form_state['module'] = 'page_manager_page';
  $form_state['callback argument'] = $form_state['page']->task_name;
  $form_state['access'] = $form_state['page']->subtask['subtask']->access;
  $form_state['no buttons'] = TRUE;
  $form_state['contexts'] = array();

  // Load contexts based on argument data:
  if ($arguments = _page_manager_page_get_arguments($form_state['page']->subtask['subtask'])) {
    $form_state['contexts'] = ctools_context_get_placeholders_from_argument($arguments);
  }
  ctools_include('context-access-admin');
  $form = array_merge($form, ctools_access_admin_form($form_state));
}