You are here

function panelizer_defaults_ui::edit_form in Panelizer 7.3

Extends ctools_export_ui::edit_form().

Change the 'exists' callback so that we can build the actual export object name before checking if it exists.

Overrides ctools_export_ui::edit_form

File

plugins/export_ui/panelizer_defaults_ui.class.php, line 95
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(&$form, &$form_state) {
  parent::edit_form($form, $form_state);
  foreach ($form['info'] as $export_key => $settings) {
    if (!empty($form['info'][$export_key]['#machine_name']['exists'])) {
      $form['info'][$export_key]['#machine_name']['exists'] = 'panelizer_defaults_ui_edit_name_exists';
    }
  }
}