当前位置: 首页>>代码示例>>PHP>>正文


PHP ctools_export_crud_delete函数代码示例

本文整理汇总了PHP中ctools_export_crud_delete函数的典型用法代码示例。如果您正苦于以下问题:PHP ctools_export_crud_delete函数的具体用法?PHP ctools_export_crud_delete怎么用?PHP ctools_export_crud_delete使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ctools_export_crud_delete函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: saveToActiveStore

 /**
  * Implements Drupal\configuration\Config\Configuration::saveToActiveStore().
  */
 public function saveToActiveStore(ConfigIteratorSettings &$settings)
 {
     ctools_include('export');
     $object = ctools_export_crud_load($this->getComponent(), $this->getIdentifier());
     if ($object) {
         ctools_export_crud_delete($this->getComponent(), $object);
     }
     $data = $this->getData();
     $data->export_type = NULL;
     // get title_pane key if configured.
     if (isset($data->conf['display']->title_pane)) {
         $title_pane = $data->conf['display']->title_pane;
     }
     $display = panels_save_display($data->conf['display']);
     // title_pane configuration workaround.
     if (isset($display->content[$title_pane])) {
         $pid = $display->content[$title_pane]->pid;
         $display->{$title_pane} = $pid;
         db_update('panels_display')->fields(array('title_pane' => $pid))->condition('did', $display->did)->execute();
     }
     $data->conf['did'] = $data->conf['display']->did;
     unset($data->conf['display']);
     ctools_export_crud_save($this->getComponent(), $data);
     $settings->addInfo('imported', $this->getUniqueId());
 }
开发者ID:isaenkov,项目名称:Dru.io,代码行数:28,代码来源:PageManagerHandlerConfiguration.php

示例2: saveToActiveStore

 /**
  * Implements Drupal\configuration\Config\Configuration::saveToActiveStore().
  */
 public function saveToActiveStore(ConfigIteratorSettings &$settings)
 {
     ctools_include('export');
     $object = ctools_export_crud_load($this->getComponent(), $this->getIdentifier());
     if ($object) {
         ctools_export_crud_delete($this->getComponent(), $object);
     }
     $data = $this->getData();
     $data->export_type = NULL;
     $group = field_group_unpack($data);
     ctools_export_crud_save($this->getComponent(), $group);
     $settings->addInfo('imported', $this->getUniqueId());
 }
开发者ID:gnulugtn,项目名称:portal,代码行数:16,代码来源:FieldGroupConfiguration.php

示例3: saveToActiveStore

 /**
  * Implements Drupal\configuration\Config\Configuration::saveToActiveStore().
  */
 public function saveToActiveStore(ConfigIteratorSettings &$settings)
 {
     ctools_include('export');
     $object = ctools_export_crud_load($this->getComponent(), $this->getIdentifier());
     if ($object) {
         ctools_export_crud_delete($this->getComponent(), $object);
     }
     $data = $this->getData();
     $data->export_type = NULL;
     panels_save_display($data->conf['display']);
     $data->conf['did'] = $data->conf['display']->did;
     unset($data->conf['display']);
     ctools_export_crud_save($this->getComponent(), $data);
     $settings->addInfo('imported', $this->getUniqueId());
 }
开发者ID:gnulugtn,项目名称:portal,代码行数:18,代码来源:PageManagerHandlerConfiguration.php

示例4: delete_page

 function delete_page($js, $input, $item)
 {
     $clone = clone $item;
     // Change the name into the title so the form shows the right value.
     // @todo file a bug against CTools to use admin title if available.
     $clone->name = $clone->title;
     $form_state = array('plugin' => $this->plugin, 'object' => &$this, 'ajax' => $js, 'item' => $clone, 'op' => $item->export_type & EXPORT_IN_CODE ? 'revert' : 'delete', 'rerender' => TRUE, 'no_redirect' => TRUE);
     $output = drupal_build_form('ctools_export_ui_delete_confirm_form', $form_state);
     if (!empty($form_state['executed'])) {
         ctools_export_crud_delete($this->plugin['schema'], $item);
         $export_key = $this->plugin['export']['key'];
         drupal_set_message(t($this->plugin['strings']['confirmation'][$form_state['op']]['success'], array('%title' => $item->title)));
         drupal_goto(ctools_export_ui_plugin_base_path($this->plugin));
     }
     return $output;
 }
开发者ID:redponey,项目名称:openatrium-7.x-2.51,代码行数:16,代码来源:panelizer_defaults_ui.class.php

示例5: delete_form_submit

 /**
  * Deletes exportable items from the database.
  */
 function delete_form_submit(&$form_state)
 {
     $item = $form_state['item'];
     ctools_export_crud_delete($this->plugin['schema'], $item);
     $export_key = $this->plugin['export']['key'];
     $message = str_replace('%title', check_plain($item->{$export_key}), $this->plugin['strings']['confirmation'][$form_state['op']]['success']);
     drupal_set_message($message);
 }
开发者ID:kennygrage,项目名称:dynastyDish,代码行数:11,代码来源:ctools_export_ui.class.php

示例6: delete_page

 /**
  * Page callback to delete an exportable item.
  */
 function delete_page($js, $input, $item)
 {
     $form_state = array('plugin' => $this->plugin, 'object' => &$this, 'ajax' => $js, 'item' => $item, 'op' => $item->export_type & EXPORT_IN_CODE ? 'revert' : 'delete', 'rerender' => TRUE, 'no_redirect' => TRUE);
     ctools_include('form');
     $output = ctools_build_form('ctools_export_ui_delete_confirm_form', $form_state);
     if (!empty($form_state['executed'])) {
         ctools_export_crud_delete($this->plugin['schema'], $item);
         $export_key = $this->plugin['export']['key'];
         $message = str_replace('%title', check_plain($item->{$export_key}), $this->plugin['strings']['confirmation'][$form_state['op']]['success']);
         drupal_set_message($message);
         drupal_goto(ctools_export_ui_plugin_base_path($this->plugin));
     }
     return $output;
 }
开发者ID:alexismb5,项目名称:ckan-drupal,代码行数:17,代码来源:ctools_export_ui.class.php

示例7: delete_page

 /**
  * Page callback to delete an exportable item.
  */
 function delete_page($js, $input, $item)
 {
     $form_state = array('plugin' => $this->plugin, 'object' => &$this, 'ajax' => $js, 'item' => $item, 'op' => $item->export_type & EXPORT_IN_CODE ? 'revert' : 'delete', 'rerender' => TRUE, 'no_redirect' => TRUE);
     $output = drupal_build_form('ctools_export_ui_delete_confirm_form', $form_state);
     if (!empty($form_state['executed'])) {
         // Cleanup the stream config and stream from static caches.
         heartbeat_stream_config_reset($item);
         ctools_export_crud_delete($this->plugin['schema'], $item);
         $message = str_replace('%title', check_plain($item->{$this->plugin['export']['key']}), $this->plugin['strings']['confirmation'][$form_state['op']]['success']);
         drupal_set_message($message);
         // Cleanup the blocks that might be in use.
         db_delete('block')->condition('module', 'heartbeat')->condition('delta', $item->class)->execute();
         drupal_goto(ctools_export_ui_plugin_base_path($this->plugin));
     }
     return $output;
 }
开发者ID:ayavuzerdogan,项目名称:thinkloud,代码行数:19,代码来源:ctools_export_ui_heartbeat_stream.class.php

示例8: revert

 /**
  * Revert the bean type to code defaults.
  */
 public function revert()
 {
     ctools_include('export');
     ctools_export_crud_delete('bean_type', $this->type);
     bean_reset();
 }
开发者ID:CuBoulder,项目名称:cu-express-drops-7,代码行数:9,代码来源:BeanCustom.class.php


注:本文中的ctools_export_crud_delete函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。