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


PHP BASE_CLASS_Widget::validateSettingList方法代码示例

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


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

示例1: validateSettingList

 public static function validateSettingList($settingList)
 {
     parent::validateSettingList($settingList);
     if ($settingList["list"] == "by_role" && empty($settingList["roles"])) {
         throw new WidgetSettingValidateException(OW::getLanguage()->text("ucarousel", "widget_settings_list_roles_error"), 'roles');
     }
     if ($settingList["list"] == "by_account_type" && empty($settingList["account_types"])) {
         throw new WidgetSettingValidateException(OW::getLanguage()->text("ucarousel", "widget_settings_list_roles_account_types"), 'account_types');
     }
 }
开发者ID:vazahat,项目名称:dudex,代码行数:10,代码来源:users_widget.php

示例2: validateSettingList

 public static function validateSettingList($settingList)
 {
     parent::validateSettingList($settingList);
     $validationMessage = OW::getLanguage()->text('photo', 'cmp_widget_photo_count_msg');
     if (!preg_match('/^\\d+$/', $settingList['photoCount'])) {
         throw new WidgetSettingValidateException($validationMessage, 'photoCount');
     }
     if ($settingList['photoCount'] > 100) {
         throw new WidgetSettingValidateException($validationMessage, 'photoCount');
     }
 }
开发者ID:tammyrocks,项目名称:photo,代码行数:11,代码来源:photo_list_widget.php

示例3: validateSettingList

 public static function validateSettingList($settingList)
 {
     parent::validateSettingList($settingList);
     $validationMessage = OW::getLanguage()->text('gheader', 'widget_height_validation_error', array('min' => self::MIN_HEIGHT, 'max' => self::MAX_HEIGHT));
     $settingList['coverHeight'] = intval($settingList['coverHeight']);
     if ($settingList['coverHeight'] < self::MIN_HEIGHT) {
         throw new WidgetSettingValidateException($validationMessage, 'coverHeight');
     }
     if ($settingList['coverHeight'] > self::MAX_HEIGHT) {
         throw new WidgetSettingValidateException($validationMessage, 'coverHeight');
     }
     if (!GHEADER_CLASS_PhotoBridge::getInstance()->isActive()) {
         return;
     }
     $albumName = trim($settingList['albumName']);
     if ($settingList['saveToPhoto'] && empty($albumName)) {
         $errorMessage = OW::getLanguage()->text('gheader', 'widget_album_name_validation_error');
         throw new WidgetSettingValidateException($errorMessage, 'albumName');
     }
 }
开发者ID:vazahat,项目名称:dudex,代码行数:20,代码来源:header_widget.php

示例4: validateSettingList

 public static function validateSettingList($settingList)
 {
     parent::validateSettingList($settingList);
     if (!UTIL_Validator::isUrlValid($settingList['rss_url'])) {
         throw new WidgetSettingValidateException(OW::getLanguage()->text('base', 'rss_widget_url_invalid_msg'), 'rss_url');
     }
     $urlInfo = parse_url($settingList['rss_url']);
     $urlHomeInfo = parse_url(OW_URL_HOME);
     if ($urlInfo['host'] == $urlHomeInfo['host']) {
         throw new WidgetSettingValidateException(OW::getLanguage()->text('base', 'rss_widget_url_invalid_msg'), 'rss_url');
     }
 }
开发者ID:vazahat,项目名称:dudex,代码行数:12,代码来源:rss_widget.php

示例5: validateSettingList

 public static function validateSettingList($settingList)
 {
     parent::validateSettingList($settingList);
     $validationMessage = OW::getLanguage()->text('forum', 'cmp_widget_forum_topics_count_msg');
     if (!preg_match('/^\\d+$/', $settingList['topicCount'])) {
         throw new WidgetSettingValidateException($validationMessage, 'topicCount');
     }
     if ($settingList['topicCount'] > 20) {
         throw new WidgetSettingValidateException($validationMessage, 'topicCount');
     }
     $validationMessage = OW::getLanguage()->text('forum', 'cmp_widget_forum_topics_post_length_msg');
     if (!preg_match('/^\\d+$/', $settingList['postLength'])) {
         throw new WidgetSettingValidateException($validationMessage, 'postLength');
     }
     if ($settingList['postLength'] > 1000) {
         throw new WidgetSettingValidateException($validationMessage, 'postLength');
     }
 }
开发者ID:vazahat,项目名称:dudex,代码行数:18,代码来源:forum_topics_widget.php

示例6: validateSettingList

 public static function validateSettingList($settingList)
 {
     parent::validateSettingList($settingList);
     if (!UTIL_Validator::isUrlValid($settingList['rss_url'])) {
         throw new WidgetSettingValidateException(OW::getLanguage()->text('base', 'rss_widget_url_invalid_msg'), 'rss_url');
     }
 }
开发者ID:ZyXelP,项目名称:oxwall,代码行数:7,代码来源:rss_widget.php


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