You are here

function panelizer_defaults_ui::edit_execute_form_standard in Panelizer 7.2

Same name and namespace in other branches
  1. 7.3 plugins/export_ui/panelizer_defaults_ui.class.php \panelizer_defaults_ui::edit_execute_form_standard()

Execute the standard form for editing.

By default, export UI will provide a single form for editing an object.

Overrides ctools_export_ui::edit_execute_form_standard

File

plugins/export_ui/panelizer_defaults_ui.class.php, line 71
Contains the administrative UI for selectable panelizer defaults.

Class

panelizer_defaults_ui
@file Contains the administrative UI for selectable panelizer defaults.

Code

function edit_execute_form_standard(&$form_state) {
  if ($form_state['form type'] == 'clone') {
    list($x, $y, $name) = explode(':', $form_state['original name']);
    $form_state['item']->title = t('Clone of') . ' ' . $form_state['item']->title;
    $form_state['item']->name = 'clone_of_' . $name;
  }
  else {
    if ($form_state['op'] == 'add') {
      $form_state['item']->panelizer_type = $this->entity_handler->entity_type;
      $form_state['item']->panelizer_key = $this->entity_bundle;
      $form_state['item']->display = $this->entity_handler
        ->get_default_display();
    }
  }
  return parent::edit_execute_form_standard($form_state);
}