當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。