You are here

function panelizer_reset_entity_form in Panelizer 7.3

Form used when an entity is panelized and is being reset.

1 string reference to 'panelizer_reset_entity_form'
PanelizerEntityDefault::page_reset in plugins/entity/PanelizerEntityDefault.class.php
Switched page callback to give the settings form.

File

includes/common.inc, line 329
Contains common forms and routines that different object types use.

Code

function panelizer_reset_entity_form($form, &$form_state) {
  $entity_type = $form_state['panelizer']->entity_type;
  $entity_info = entity_get_info($entity_type);
  $form = array();

  // Build the confirmation form.
  $form = confirm_form($form, t('Are you sure you want to reset the panelizer status for this %entity?', array(
    '%entity' => $entity_info['label'],
  )), dirname(dirname($_GET['q'])), t('This %entity will be reset to the default panelizer state, discarding any modifications made to it. This action cannot be undone.', array(
    '%entity' => $entity_info['label'],
  )), t('Reset'), t('Cancel'), 'panelizer_reset_entity_confirm');

  // Append the revision form.
  panelizer_add_revision_info_form($form, $form_state);
  return $form;
}