You are here

function panelizer_defaults_ui::edit_form_validate 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_form_validate()

Validate callback for the edit form.

Overrides ctools_export_ui::edit_form_validate

File

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

Class

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

Code

function edit_form_validate(&$form, &$form_state) {
  $export_key = $this->plugin['export']['key'];

  // When adding a machine name, the entity/bundle are left off so the user
  // does not have to deal with it. We put it back here behind the scenes.
  $name = $form_state['values'][$export_key];
  form_set_value($form['info'][$export_key], implode(':', array(
    $this->entity_handler->entity_type,
    $this->entity_bundle,
    $name,
  )), $form_state);
}