36 $form_state[
'orig_item'] = clone($form_state[
'item']);
39 if (isset($form_state[
'input'][
'object_type']) && $form_state[
'input'][
'object_type'] != $form_state[
'item']->object_type) {
41 $export_type = $form_state[
'item']->export_type;
42 $schema = ctools_export_get_schema($form_state[
'plugin'][
'schema']);
43 $data = (array) $form_state[
'item'];
50 foreach ($schema[
'fields'] as $field => $field_schema) {
51 if (isset($field_schema[
'serialize']) && $field_schema[
'serialize']) {
52 $data[$field] = serialize($data[$field]);
55 $data = (object)$data;
57 $form_state[
'item']->export_type = $export_type;
59 parent::edit_form($form, $form_state);
63 $form_state[
'no_cache'] = TRUE;
65 if (method_exists($form_state[
'item'],
'edit_form')) {
66 $form_state[
'item']->edit_form($form, $form_state);
69 $form[
'info'][
'object_type_menu'] = array(
71 '#value' => isset($form_state[
'item']->object_type) ? $form_state[
'item']->object_type : NULL,
79 dpm($form_state,
'mailinglist_export_ui::edit_form_validate');
80 if ($form_state[
'input'][
'object_type_menu'] != $form_state[
'input'][
'object_type']) {
82 form_set_error(
'object_type',
'Type Changed, Check Settings!');
83 watchdog(
'Mailinglist',
'Type Change Verify', array(), WATCHDOG_DEBUG);
86 parent::edit_form_validate($form, $form_state);
88 if (method_exists($form_state[
'item'],
'edit_form_validate')) {
89 $form_state[
'item']->edit_form_validate($form, $form_state);
97 dpm($form_state,
'mailinglist_export_ui::edit_form_submit');
99 if (method_exists($form_state[
'item'],
'edit_form_submit')) {
100 $form_state[
'item']->edit_form_submit($form, $form_state);
103 watchdog(
'mailinglist form',
'xx', array(), WATCHDOG_DEBUG );
104 watchdog(
'mailinglist state',
'xx', array(), WATCHDOG_DEBUG );
105 parent::edit_form_submit($form, $form_state);
115 dpm(debug_backtrace(),
'mailinglist_export_ui::edit_save_form()');
118 parent::edit_save_form($form_state);
120 $item = &$form_state[
'item'];
121 if ($form_state[
'op'] ==
'add') {
122 $item->table = $this->plugin[
'schema'];
126 $orig_item = $form_state[
'orig_item'];
127 if ($item->object_type != $orig_item->object_type) {
128 $item->changedType($orig_item);
131 $item->edited($orig_item);
141 $item = $form_state[
'item'];
142 dpm($item,
'Delete');
144 parent::delete_form_submit($form_state);
edit_form_validate(&$form, &$form_state)
Implements ctools_export_ui::edit_form_validate().
mailinglist_array_merge_recursive_distinct(array &$array1, array &$array2)
array_merge_recursive does indeed merge arrays, but it converts values with duplicate keys to arrays ...
edit_save_form($form_state)
Place for common code for export_ui classes Forwards a lot of ctools_export_ui hooks to the exportabl...
edit_form_submit(&$form, &$form_state)
Implements ctools_export_ui::edit_form_submit().
delete_form_submit(&$form_state)
Implements ctools_export_ui::delete_form_submit().
_mailinglist_object_factory($schema, $data)
Builds an type variable object from a database table entry.
edit_form(&$form, &$form_state)
Implements ctools_export_ui::edit_form().