/** * (non-PHPdoc) * @see Yamm_Entity::_update() */ protected function _update($object, $identifier) { // TODO we should check for all dependencies which are not data, such as // handlers and modules (this is done by views_export module). views_include('view'); // Should give us the '$view' variable eval($object); $view->save(); views_ui_cache_set($view); menu_rebuild(); cache_clear_all('*', 'cache_views'); cache_clear_all(); }
function clone_page($js, $input, $item, $step = NULL) { drupal_set_title($this->get_page_title('clone', $item)); $name = $item->{$this->plugin['export']['key']}; $form_state = array('plugin' => $this->plugin, 'object' => &$this, 'ajax' => $js, 'item' => $item, 'op' => 'add', 'form type' => 'clone', 'original name' => $name, 'rerender' => TRUE, 'no_redirect' => TRUE, 'step' => $step, 'function args' => func_get_args()); $output = drupal_build_form('views_ui_clone_form', $form_state); if (!empty($form_state['executed'])) { $item->name = $form_state['values']['name']; $item->human_name = $form_state['values']['human_name']; $item->vid = NULL; views_ui_cache_set($item); drupal_goto(ctools_export_ui_plugin_menu_path($this->plugin, 'edit', $item->name)); } return $output; }
function geofield_views_ui_change_proximity_widget($form, &$form_state) { $item =& $form_state['handler']->options; $changed = $item['source'] != $form_state['values']['options']['source']; $item['source'] = $form_state['values']['options']['source']; if ($changed) { if ($item['source'] == 'manual') { $item['value']['origin'] = array('lat' => '', 'lon' => ''); } else { $item['value']['origin'] = ''; } } $form_state['view']->set_item($form_state['display_id'], $form_state['type'], $form_state['id'], $item); views_ui_cache_set($form_state['view']); $form_state['rerender'] = TRUE; $form_state['rebuild'] = TRUE; $form_state['force_expose_options'] = TRUE; }