當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Theme::validate方法代碼示例

本文整理匯總了PHP中Theme::validate方法的典型用法代碼示例。如果您正苦於以下問題:PHP Theme::validate方法的具體用法?PHP Theme::validate怎麽用?PHP Theme::validate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Theme的用法示例。


在下文中一共展示了Theme::validate方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setCurrentTheme

 public static function setCurrentTheme($x)
 {
     self::$set_theme = $x;
     $theme = new Theme(self::$set_theme);
     if ($theme->validate()) {
         self::$curr_theme = $theme;
     }
 }
開發者ID:alecgorge,項目名稱:TopHat,代碼行數:8,代碼來源:cc-themes.php

示例2: actionCreate

 public function actionCreate()
 {
     $model = new Theme();
     $suc = Yii::t('info', 'The record was successfully created');
     $err = Yii::t('info', 'The record could not be created');
     $zip = new XUploadForm();
     $userZips = array();
     if (!isset($_POST[$this->modelName])) {
         Yii::app()->user->setState('images', NULL);
     }
     if (isset($_POST['Theme'])) {
         $model->attributes = $_POST['Theme'];
         $userZips = Yii::app()->user->getState('images');
         if ($model->validate()) {
             //$path = Yii::app()->runtimePath.'/dir/'.$model->zip;
             //$img->saveAs('dir/'.$model->name);
             $model->save();
             $path = $userZips[0]["path"];
             $this->unzipTheme($path, $model->name, UtilityHelper::yiiparam('frontPath') . "/www/themes");
             Yii::app()->user->setFlash(TbHtml::ALERT_COLOR_SUCCESS, $suc);
             if (Yii::app()->getRequest()->getIsAjaxRequest()) {
                 $this->renderPartial('_view', array('model' => $model), false, true);
                 Yii::app()->end();
             } else {
                 $this->redirect(array('view', 'id' => $model->id));
             }
         } else {
             Yii::app()->user->setFlash(TbHtml::ALERT_COLOR_ERROR, $err);
         }
         UtilityHelper::sendToLog($userZips);
     }
     if (Yii::app()->getRequest()->getIsAjaxRequest()) {
         $this->renderPartial('_form', array('model' => $model, 'zip' => $zip, 'userZips' => $userZips), false, true);
         Yii::app()->end();
     }
     $this->render('create', array('model' => $model, 'zip' => $zip, 'userZips' => $userZips));
 }
開發者ID:Rudianasaja,項目名稱:cycommerce,代碼行數:37,代碼來源:ThemeController.php

示例3: getTheme

 public function getTheme()
 {
     if (!array_key_exists('theme', $this->info)) {
         $settings = (array) $this->getSettings();
         plugin('page_gettheme', array($settings));
         $settings = filter('page_gettheme', $settings);
         if (array_key_exists('theme', $settings)) {
             $theme = new Theme($settings['theme']);
             if ($theme->validate()) {
                 $this->info['theme'] = $theme->getName();
             }
         } else {
             $this->info['theme'] = Settings::get('site', 'theme', true);
         }
     }
     return filter('node_theme', $this->info['theme']);
 }
開發者ID:alecgorge,項目名稱:TopHat,代碼行數:17,代碼來源:cc-content.php

示例4: Theme

<?php

include_once "Theme.php";
include "theme_database.php";
$theme = new Theme();
$theme->theme = $_POST["theme"];
if ($theme->validate()) {
    echo "is valid";
    echo $theme->toString();
} else {
    echo "Try Again";
}
getConnection();
#insertTheme($theme-> theme = $_POST["theme"]);
#retrieveThemeById($id = 7);
#updateTheme($id = 7,$theme->theme = $_POST["theme"]);
deleteThemeById($id = 8);
開發者ID:asvaldenegro,項目名稱:CYL,代碼行數:17,代碼來源:ProcessCreateNewTheme.php


注:本文中的Theme::validate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。