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


PHP ctools_export_ui::edit_form_validate方法代码示例

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


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

示例1: t

 /**
  * Validate submission of the mini panel edit form.
  */
 function edit_form_basic_validate($form, &$form_state)
 {
     parent::edit_form_validate($form, $form_state);
     if (preg_match("/[^A-Za-z0-9 ]/", $form_state['values']['category'])) {
         form_error($form['category'], t('Categories may contain only alphanumerics or spaces.'));
     }
 }
开发者ID:neclimdul,项目名称:panels,代码行数:10,代码来源:panels_mini_ui.class.php

示例2: array

 /**
  * @todo
  */
 function edit_form_validate(&$form, &$form_state)
 {
     parent::edit_form_validate($form, $form_state);
     $values = $form_state['values'];
     if ($values['parent'] == '_none') {
         form_set_value(array('#parents' => array('parent')), '', $form_state);
     } else {
         form_set_value(array('#parents' => array('mode')), DELTA_PRESERVE, $form_state);
     }
 }
开发者ID:ehazell,项目名称:AWBA,代码行数:13,代码来源:delta_export_ui.class.php

示例3:

 /**
  * Implements ctools_export_ui::edit_form_validate().
  */
 function edit_form_validate(&$form, &$form_state)
 {
     parent::edit_form_validate($form, $form_state);
     // If POP3 mailbox is chosen, messages should be deleted after processing.
     // Do not set an actual error because this is helpful for testing purposes.
     if ($form_state['values']['settings']['type'] == 'pop3' && $form_state['values']['settings']['delete_after_read'] == 0) {
         mailhandler_report('warning', 'Unless you check off "Delete messages after they are processed" when using a POP3 mailbox, old emails will be re-imported each time the mailbox is processed. You can partially prevent this by mapping Message ID to a unique target in the processor configuration - see INSTALL.txt or advanced help for more information');
     }
     // Dummy library is only for testing.
     if ($form_state['values']['settings']['retrieve'] == 'MailhandlerRetrieveDummy') {
         mailhandler_report('warning', 'Because you selected the dummy retrieval library, Mailhandler will not import any messages. Please select another retrieval library, such as the PHP IMAP library.');
     }
 }
开发者ID:redponey,项目名称:openatrium-7.x-2.51,代码行数:16,代码来源:mailhandler_mailbox_ui.class.php

示例4: t

 /**
  * Validate callback for the edit form.
  */
 function edit_form_validate(&$form, &$form_state)
 {
     parent::edit_form_validate($form, $form_state);
     $pluginName = $form_state['values']['plugin_name'];
     if (empty($pluginName)) {
         form_set_error('plugin_name', t('No valid plugin name given. The plugin needs to be a valid class as extension of iHeartbeatPlugin.'));
     }
     $pluginWrapper = heartbeat_plugins_get_plugin($pluginName);
     if ($pluginWrapper instanceof iHeartbeatPluginWrapper) {
         $plugin = $pluginWrapper->getPlugin();
     }
     if (!$plugin instanceof HeartbeatBasePlugin) {
         form_set_error('plugin_name', t('Class @class does not implement HeartbeatBasePlugin.', array('@class' => $pluginName)));
     }
 }
开发者ID:ayavuzerdogan,项目名称:thinkloud,代码行数:18,代码来源:ctools_export_ui_heartbeat_plugin.class.php

示例5:

 /**
  * Validate callback for the edit form.
  */
 function edit_form_validate(&$form, &$form_state)
 {
     parent::edit_form_validate($form, $form_state);
     if (!empty($form_state['values']['html'])) {
         if ($validate = zm_template_engine_validate_template($form_state['values']['html'])) {
             $current_item = $this->load_item($form_state['item']->name);
             if ($current_item && ($engine = zm_template_engine_load())) {
                 $filename = $engine->getCacheFilename($current_item->name);
                 $engine->clearCacheFiles();
             }
         } else {
             form_set_error('html', 'HTML template code error, please check again!!!');
         }
     }
 }
开发者ID:vermauv,项目名称:movieza,代码行数:18,代码来源:ZMTemplateUI.class.php

示例6: foreach

 function edit_form_validate(&$form, &$form_state)
 {
     ctools_get_plugins('openlayers', 'layer_types');
     $layer = openlayers_layer_type_load($form_state['values']['layer_type']);
     $form_state['values']['data'] = $form_state['values'][$form_state['values']['layer_type']];
     if (empty($form_state['values']['layer_type'])) {
         form_set_error('layer_type', 'Layer type cannot be empty.');
     }
     $parent = get_parent_class($layer);
     $parent_object = new $parent();
     $form_state['values']['data'] += $layer->options_init();
     $form_state['values']['data'] += $parent_object->options_init();
     $layer_types = openlayers_layer_types();
     foreach ($layer_types as $layer_type) {
         unset($form_state['values'][$layer_type['name']]);
     }
     unset($form_state['values']['layer_type']);
     if (method_exists($layer, 'options_form_validate')) {
         $layer->options_form_validate($form, $form_state['values']);
     }
     parent::edit_form_validate($form, $form_state);
 }
开发者ID:EarthTeam,项目名称:earthteam.net,代码行数:22,代码来源:openlayers_layers_ui.class.php

示例7: array

 /**
  * Implements edit_form_submit().
  */
 function edit_form_validate(&$form, &$form_state)
 {
     parent::edit_form_validate($form, $form_state);
     if (isset($form_state['values']['stream_op']) && $form_state['values']['stream_op'] == 'add_clone') {
         if (empty($form_state['values']['stream_original'])) {
             $export_key = $this->plugin['export']['key'];
             $element = array('#value' => $form_state['item']->{$export_key}, '#parents' => array($export_key));
             form_error($element, t('You need to select a stream to clone from.'));
         }
     }
 }
开发者ID:ayavuzerdogan,项目名称:thinkloud,代码行数:14,代码来源:ctools_export_ui_heartbeat_stream.class.php

示例8:

 function edit_form_validate(&$form, &$form_state)
 {
     parent::edit_form_validate($form, $form_state);
     // While we short circuited the main validate hook, we need to keep this one.
     panels_edit_display_settings_form_validate($form, $form_state);
 }
开发者ID:padmanabhan-developer,项目名称:Norway-GO,代码行数:6,代码来源:panels_layouts_ui.class.php

示例9: t

 function edit_form_validate(&$form, &$form_state)
 {
     parent::edit_form_validate($form, $form_state);
     // Validate Categories to make sure they don't contain illegal characters.
     if (isset($form_state['values']['category'])) {
         if (preg_match("/[^A-Za-z0-9 ]/", $form_state['values']['category'])) {
             form_error($form['category'], t('Categories may contain only alphanumerics or spaces.'));
         }
     }
 }
开发者ID:anatolic,项目名称:vintage,代码行数:10,代码来源:panels_frame_ui.class.php


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