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


PHP ctools_export_ui类代码示例

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


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

 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

示例5: 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

示例6: 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

示例7:

 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

示例8:

 /**
  * 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

示例9:

 /**
  * 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

示例10: 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

示例11: 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

示例12: 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

示例13:

 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

示例14: 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

示例15: 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


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