• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ctools_export_ui类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1:

 /**
  * Overrides ctools_export_ui::edit_save_form().
  *
  * Clear menu cache in case the SPARQL endpoint path was modified.
  */
 function edit_save_form($form_state)
 {
     parent::edit_save_form($form_state);
     if (!empty($form_state['plugin']['schema']) && $form_state['plugin']['schema'] == 'arc2_store_settings') {
         menu_rebuild();
     }
 }
开发者ID:drupdateio,项目名称:teca,代码行数:12,代码来源:arc2_store_export_ui.class.php


示例2:

 /**
  * Overrides ctools_export_ui::list_form().
  *
  * Simplifies the form similar to how the Context module does it.
  */
 function list_form(&$form, &$form_state)
 {
     parent::list_form($form, $form_state);
     $form['top row']['submit'] = $form['bottom row']['submit'];
     $form['top row']['reset'] = $form['bottom row']['reset'];
     $form['bottom row']['#access'] = FALSE;
     return;
 }
开发者ID:khoegenauer,项目名称:exframe,代码行数:13,代码来源:arc2_store_export_ui.class.php


示例3: edit_form

 /**
  * Include some ctools stuff required for drupal ajax to work properly.
  * @see ctools_export_ui::edit_form()
  */
 public function edit_form(&$form, &$form_state)
 {
     // This is needed in order to get the ajax working in the ctools form.
     ctools_include('plugins');
     ctools_include('export');
     ctools_get_plugins('ctools', 'export_ui', 'entity_collection');
     parent::edit_form($form, $form_state);
     // We need to define our own function, the one provided by ctools does not
     // work with the Drupal ajax API.
     $form['info']['name']['#machine_name']['exists'] = 'entity_collection_bundle_exists';
 }
开发者ID:enriquesanchezhernandez,项目名称:campaigns,代码行数:15,代码来源:entity_collection_ui.class.php


示例4: array

 /**
  * Overrides ctools_export_ui::edit_execute_form().
  *
  * This is hacky, but since CTools Export UI uses drupal_goto() we have to
  * effectively change the plugin to modify the redirect path dynamically.
  */
 function edit_execute_form(&$form_state)
 {
     $output = parent::edit_execute_form($form_state);
     if (!empty($form_state['executed'])) {
         $clicked = $form_state['clicked_button']['#value'];
         if (t('Add item') == $clicked || t('Save and edit') == $clicked) {
             // We always want to redirect back to this page when adding an item,
             // but we want to preserve the destination so we can be redirected back
             // to where we came from after clicking "Save".
             $options = array();
             if (!empty($_GET['destination'])) {
                 $options['query']['destination'] = $_GET['destination'];
                 unset($_GET['destination']);
             }
             // Sets redirect path and options.
             $op = $form_state['op'];
             $name = $form_state['values']['name'];
             $path = 'add' != $op ? current_path() : 'admin/config/search/current_search/list/' . $name . '/edit';
             $this->plugin['redirect'][$op] = array($path, $options);
         }
     }
     return $output;
 }
开发者ID:ludichrislyts,项目名称:fieldWork,代码行数:29,代码来源:current_search_export_ui.class.php


示例5: edit_form_submit

 /**
  * Implements edit_form_submit().
  */
 function edit_form_submit(&$form, &$form_state)
 {
     if (isset($form_state['values']['stream_op']) && $form_state['values']['stream_op'] == 'add_clone') {
         $pluginBasePath = ctools_export_ui_plugin_base_path($this->plugin) . '/list/';
         drupal_goto($pluginBasePath . $form_state['values']['stream_original'] . '/clone');
     } else {
         // First change the values.
         foreach ($form_state['values']['settings'] as $name => $setting) {
             if (is_array($setting)) {
                 foreach ($setting as $key => $value) {
                     $form_state['values']['settings'][$key] = $value;
                 }
                 unset($form_state['values']['settings'][$name]);
             }
         }
         heartbeat_stream_config_reset();
         // Let CTools prepare the "item" variable as normal.
         parent::edit_form_submit($form, $form_state);
         drupal_set_message(t('Heartbeat streams cache has been cleared and menu is rebuild.'));
     }
 }
开发者ID:ayavuzerdogan,项目名称:thinkloud,代码行数:24,代码来源:ctools_export_ui_heartbeat_stream.class.php


示例6:

 function list_filter($form_state, $item)
 {
     if ($form_state['values']['category'] != 'all' && $form_state['values']['category'] != $item->category) {
         return TRUE;
     }
     return parent::list_filter($form_state, $item);
 }
开发者ID:singhneeraj,项目名称:fr-store,代码行数:7,代码来源:ctools_custom_content_ui.class.php


示例7: array

 /**
  * Adding or editing snippet
  * @param $form
  * @param $form_state
  */
 function edit_form(&$form, &$form_state)
 {
     // this is to show the preview
     $form['snippet_preview_wrapper'] = array('#prefix' => '<div id="snippet_preview">', '#suffix' => '</div>', '#markup' => '');
     // adding parent element
     parent::edit_form($form, $form_state);
     if ($form_state['form type'] == 'clone') {
         $default_snippet = $this->load_item($form_state['original name']);
     } elseif ($form_state['form type'] == 'add') {
         $default_snippet = $form_state['item'];
         $default_snippet->rid = NULL;
         $default_snippet->content = '';
     } else {
         $default_snippet = $form_state['item'];
     }
     // Needs to disable the admin_tile and name (machine name) fields
     // and delete button for editing snippet
     if ($form_state['op'] == 'edit') {
         $form['info']['admin_title']['#disabled'] = TRUE;
         $form['info']['name']['#disabled'] = TRUE;
         $form['buttons']['delete']['#access'] = FALSE;
     }
     $form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#description' => t('Title for the textarea-exportible.'), '#default_value' => $default_snippet->rid ? $default_snippet->title_revision : $default_snippet->title);
     $form['content'] = array('#type' => 'text_format', '#title' => t('Content'), '#description' => t('Description of this snippet.'), '#default_value' => $default_snippet->content, '#format' => @$default_snippet->content_format);
     $form['preview'] = array('#type' => 'button', '#limit_validation_errors' => array(), '#value' => t('Preview'), '#submit' => array('snippet_build_preview'), '#ajax' => array('callback' => 'snippet_form_build_preview_callback', 'wrapper' => 'snippet_preview'), '#weight' => 101);
 }
开发者ID:sharprakeshverma,项目名称:LifeStyle,代码行数:31,代码来源:snippet_ctools_export_ui.class.php


示例8: array

 /**
  * Provide the actual editing form.
  */
 function edit_form(&$form, &$form_state)
 {
     parent::edit_form($form, $form_state);
     $form['title'] = array('#type' => 'textfield', '#title' => t('Title'), '#description' => t('A human-readable title for the provider.'), '#size' => 32, '#maxlength' => 255, '#required' => TRUE, '#default_value' => $form_state['item']->title);
     $form['endpoint'] = array('#type' => 'textfield', '#title' => t('Endpoint'), '#description' => t('The endpoint where OEmbed requests are going to be sent.'), '#size' => 32, '#maxlength' => 255, '#required' => TRUE, '#default_value' => $form_state['item']->endpoint);
     $form['scheme'] = array('#type' => 'textarea', '#title' => t('Schemes'), '#description' => t('Newline separated list of schemes like !example', array('!example' => 'http://*.revision3.com/*')), '#required' => TRUE, '#default_value' => $form_state['item']->scheme);
 }
开发者ID:juanmnl07,项目名称:dandeleon_dev,代码行数:10,代码来源:oembed_provider_ui.class.php


示例9:

 function hook_menu(&$items)
 {
     // Change the item to a tab on the fb_social configuration page.
     $this->plugin['menu']['items']['list callback']['type'] = MENU_LOCAL_TASK;
     $this->plugin['menu']['items']['list callback']['weight'] = 10;
     parent::hook_menu($items);
 }
开发者ID:nimish321,项目名称:openscholar,代码行数:7,代码来源:fb_social_presets_ui.class.php


示例10:

 /**
  * Create the filter/sort form at the top of a list of exports.
  */
 function list_form(&$form, &$form_state)
 {
     // Put a wrapper around the form so it can be hidden.  Unsetting the form
     // rows or doing nothing here doesn't seem to do the trick.
     parent::list_form($form, $form_state);
     $form['#prefix'] = '<div class="finder-ui-list-wrapper">' . $form['#prefix'];
     $form['#suffix'] = $form['#prefix'] . '</div>';
 }
开发者ID:billtzim,项目名称:Points-of-Interest,代码行数:11,代码来源:finder_ui.class.php


示例11:

 /**
  * Remove fields associated to bundles that are being deleted.
  */
 function delete_form_submit(&$form_state)
 {
     parent::delete_form_submit($form_state);
     if ($form_state['op'] == 'delete') {
         field_attach_delete_bundle('fieldable_panels_pane', $form_state['item']->name);
         entity_info_cache_clear();
     }
 }
开发者ID:michael-wojcik,项目名称:open_eggheads,代码行数:11,代码来源:fieldable_panels_pane.class.php


示例12: time

 function edit_form_submit(&$form, &$form_state)
 {
     $form_state["values"]['changed'] = time();
     parent::edit_form_submit($form, $form_state);
     $template_code = $form_state["values"]['html'];
     $item = $form_state['item'];
     zm_template_save_template($template_code, $item->name);
 }
开发者ID:vermauv,项目名称:movieza,代码行数:8,代码来源:ZMTemplateUI.class.php


示例13: serialize

 /**
  * Prepare the tag values before they are added to the database.
  */
 function edit_form_submit(&$form, &$form_state)
 {
     $settings = $form_state['values']['settings'];
     // Since the targeting form is reusable it isn't already in the settings
     // array so we grab it here.
     $settings['targeting'] = $form_state['values']['targeting'];
     $form_state['values']['settings'] = serialize($settings);
     parent::edit_form_submit($form, $form_state);
 }
开发者ID:pchop2,项目名称:drupal_dfp,代码行数:12,代码来源:dfp_tag_ui.class.php


示例14: array

 function edit_form_submit(&$form, &$form_state)
 {
     parent::edit_form_submit($form, $form_state);
     if (module_exists('mailhandler_default')) {
         drupal_set_message(t("Now that you've created a mailbox, send it a test email and try to <a href='@import-page'>create a source node</a> to start importing messages.", array('@import-page' => url('node/add/mailhandler-source'))));
     } else {
         drupal_set_message(t("Now that you've created a mailbox, you'll need to <a href='@importer-add'>create a Feeds importer</a> or <a href='@import-page'>run an existing importer</a>. Consider <a href='@module-page'>enabling the Mailhandler quick-start</a> module.", array('@importer-add' => url(MAILHANDLER_MENU_PREFIX . '/feeds/add'), '@import-page' => url('import'), '@module-page' => url('admin/modules'))));
     }
 }
开发者ID:redponey,项目名称:openatrium-7.x-2.51,代码行数:9,代码来源:mailhandler_mailbox_ui.class.php


示例15:

 function list_form(&$form, &$form_state)
 {
     parent::list_form($form, $form_state);
     $form['top row']['submit'] = $form['bottom row']['submit'];
     $form['top row']['reset'] = $form['bottom row']['reset'];
     $form['bottom row']['#access'] = FALSE;
     // Invalidate the context cache.
     context_invalidate_cache();
     return;
 }
开发者ID:drupdateio,项目名称:gvj,代码行数:10,代码来源:context_export_ui.class.php


示例16: substr

 function edit_form_submit($form, &$form_state) {
   parent::edit_form_submit($form, $form_state);
   $type = substr($form_state['values']['service_charge'], -1) == '%' ? 'percentage' : 'price';
   $amount = str_replace(array('%', '='), '', $form_state['values']['service_charge']);
   $form_state['item']->data = array(
     'service_charge' => trim($amount),
     'service_charge_type' => $type,
     'service_charge_title' => $form_state['values']['service_charge_title'],
   );
 }
开发者ID:HamzaBendidane,项目名称:prel,代码行数:10,代码来源:uc_custom_payment_ui.class.php


示例17: array

  /**
   * Provide a list of sort options.
   */
  function list_sort_options() {
    $options = parent::list_sort_options();

    $options += array(
      'width' => t('Width'),
      'height' => t('Height'),
    );

    return $options;
  }
开发者ID:rtdean93,项目名称:tbytam,代码行数:13,代码来源:oembed_preset_ui.class.php


示例18: array

 /**
  * Provide the actual editing form.
  */
 function edit_form(&$form, &$form_state)
 {
     parent::edit_form($form, $form_state);
     // Add the buttons if the wizard is not in use.
     if (empty($form_state['form_info'])) {
         // Add buttons.
         $form['buttons']['submit']['#attributes'] = array('class' => array('enabled-for-ajax'));
         // Disable view display selection if a view has not been chosen.
         if (empty($form_state['values']['name'])) {
             $form['buttons']['submit']['#disabled'] = TRUE;
         }
     }
 }
开发者ID:jayelless,项目名称:beehive,代码行数:16,代码来源:commons_bw_ui.class.php


示例19:

 function list_form(&$form, &$form_state)
 {
     parent::list_form($form, $form_state);
     // This is perhaps a bit brutal, but I don't think that any sites
     // will have enough premium levels to warrant the very fancy
     // filtering interface CTools provide by default. If you really need
     // this interface, please file a bug, and we will consider making an
     // option for enabling it.
     // TODO: This is really an ugly way to hide these, but pending
     // resolution of http://drupal.org/node/1133740, it seems to be the
     // best way to go.
     $form['top row']['#access'] = FALSE;
     $form['bottom row']['#access'] = FALSE;
 }
开发者ID:rollinsb1010,项目名称:bbcom,代码行数:14,代码来源:levels_export_ui.class.php


示例20: isset

 /**
  * {@inheritdoc}
  */
 function edit_form(&$form, &$form_state)
 {
     parent::edit_form($form, $form_state);
     $preset = $form_state['item'];
     // Determine the currently selected entity type.
     $selected = isset($form_state['values']['entity_type']) ? $form_state['values']['entity_type'] : $preset->entity_type;
     // Disable form submission if an entity type has not been selected.
     if (empty($selected)) {
         $form['buttons']['submit']['#disabled'] = TRUE;
     }
     // Wrap the submit button in markup to allow it to be targeted with JS.
     $form['buttons']['submit']['#prefix'] = '<span id="save-button">';
     $form['buttons']['submit']['#suffix'] = '</span>';
 }
开发者ID:drupalicus,项目名称:drupal-commons,代码行数:17,代码来源:ctools_export_ui_entity_embed.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ctrl_options类代码示例发布时间:2022-05-23
下一篇:
PHP csv_import_reader类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap