You are here

function panelizer_panelizer_task_edit_settings in Panelizer 7.2

Same name and namespace in other branches
  1. 7.3 plugins/task_handlers/panelizer_node.inc \panelizer_panelizer_task_edit_settings()

General settings for the panel

1 string reference to 'panelizer_panelizer_task_edit_settings'
panelizer_node.inc in plugins/task_handlers/panelizer_node.inc
This is the task handler plugin to handle an entity view. NOTE: This is named panelizer_node for historical reasons. It is too much of a pain to change the name of a task handler. This panelizes any entity not just a node.

File

plugins/task_handlers/panelizer_node.inc, line 321
This is the task handler plugin to handle an entity view. NOTE: This is named panelizer_node for historical reasons. It is too much of a pain to change the name of a task handler. This panelizes any entity not just a node.

Code

function panelizer_panelizer_task_edit_settings($form, &$form_state) {
  ctools_include('context');
  ctools_include('context-task-handler');
  $conf = $form_state['handler']->conf;
  $form['title'] = array(
    '#type' => 'textfield',
    '#default_value' => !empty($conf['title']) ? $conf['title'] : t('Panelizer'),
    '#title' => t('Administrative title'),
    '#description' => t('Administrative title of this variant.'),
  );
  $contexts = ctools_context_handler_get_all_contexts($form_state['task'], $form_state['subtask'], $form_state['handler']);
  $required_context = new ctools_context_required(t('Panelized entity'), 'entity');
  $form['context'] = ctools_context_selector($contexts, $required_context, isset($conf['context']) ? $conf['context'] : '');
  return $form;
}