You are here

function page_manager_page_import_subtask 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_import_subtask()

Import a task handler from cut & paste

1 string reference to 'page_manager_page_import_subtask'
page_manager_page_menu in page_manager/plugins/tasks/page.admin.inc
Delegated implementation of hook_menu().

File

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

Code

function page_manager_page_import_subtask(&$form_state, $task_name) {
  $form_state['task'] = page_manager_get_task($task_name);
  drupal_set_title(t('Import page'));
  $form['name'] = array(
    '#type' => 'textfield',
    '#title' => t('Page name'),
    '#description' => t('Enter the name to use for this page if it is different from the source page. Leave blank to use the original name of the page.'),
  );
  $form['path'] = array(
    '#type' => 'textfield',
    '#title' => t('Path'),
    '#description' => t('Enter the path to use for this page if it is different from the source page. Leave blank to use the original path of the page.'),
  );
  $form['overwrite'] = array(
    '#type' => 'checkbox',
    '#title' => t('Allow overwrite of an existing page'),
    '#description' => t('If the name you selected already exists in the database, this page will be allowed to overwrite the existing page.'),
  );
  $form['object'] = array(
    '#type' => 'textarea',
    '#title' => t('Paste page code here'),
    '#rows' => 15,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Import'),
  );
  return $form;
}