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


PHP Themes::getColorThemesList方法代码示例

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


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

示例1: getDefaultTheme

 public static function getDefaultTheme()
 {
     if (!isset(self::$_defaultTheme)) {
         $sql = "SELECT title, color_theme, bg_image FROM {{themes}} WHERE is_default=1";
         $data = Yii::app()->db->createCommand($sql)->queryRow();
         if (demo()) {
             if (isset($_GET['theme']) && array_key_exists($_GET['theme'], Themes::getColorThemesList())) {
                 self::$_params['color_theme'] = $_GET['theme'];
             } else {
                 self::$_params['color_theme'] = isset(Yii::app()->request->cookies['theme']) ? (string) Yii::app()->request->cookies['theme'] : $data['color_theme'];
             }
         } else {
             self::$_params['color_theme'] = $data['color_theme'];
         }
         if (self::$_params['color_theme'] == 'color-green.css') {
             self::$_params['bg_image'] = $data['bg_image'] ? $data['bg_image'] : 'demo-cloud.jpg';
         } else {
             self::$_params['bg_image'] = $data['bg_image'];
         }
         self::$_defaultTheme = $data['title'];
     }
     return self::$_defaultTheme;
 }
开发者ID:barricade86,项目名称:raui,代码行数:23,代码来源:Themes.php

示例2: init

 function init()
 {
     if (!oreInstall::isInstalled() && !(Yii::app()->controller->module && Yii::app()->controller->module->id == 'install')) {
         $this->redirect(array('/install'));
     }
     setLang();
     $modulesToCheck = ConfigurationModel::getModulesList();
     foreach ($modulesToCheck as $module) {
         if (param('module_enabled_' . $module) === null) {
             ConfigurationModel::createValue('module_enabled_' . $module, 0);
             Yii::app()->params['module_enabled_' . $module] = 0;
         }
     }
     unset($modulesToCheck);
     $this->assetsGenPath = Yii::getPathOfAlias('webroot.assets');
     $this->assetsGenUrl = Yii::app()->getBaseUrl(true) . '/assets/';
     Yii::app()->user->setState('menu_active', '');
     $this->pageTitle = tt('siteName', 'seo');
     $this->pageKeywords = tt('siteKeywords', 'seo');
     $this->pageDescription = tt('siteDescription', 'seo');
     Yii::app()->name = $this->pageTitle;
     $this->defaultTheme = Themes::getDefaultTheme();
     if (!$this->defaultTheme) {
         $this->defaultTheme = 'classic';
     }
     Yii::app()->theme = $this->defaultTheme;
     $this->baseUrl = Yii::app()->baseUrl;
     $this->baseThemeUrl = Yii::app()->theme->baseUrl;
     if (Yii::app()->getModule('menumanager')) {
         if (!(Yii::app()->controller->module && Yii::app()->controller->module->id == 'install')) {
             $this->infoPages = Menu::getMenuItems(true, 2);
         }
     }
     $subItems = array();
     if (!Yii::app()->user->isGuest) {
         $subItems = HUser::getMenu();
     }
     $this->aData['userCpanelItems'] = Menu::getMenuItems(true, 1);
     $this->aData['userCpanelItems'][] = array('label' => tt('Reserve apartment', 'common'), 'url' => array('/booking/main/mainform'), 'visible' => Yii::app()->user->checkAccess('backend_access') === false, 'linkOptions' => array('class' => 'fancy'), 'itemOptions' => array('class' => 'depth_zero'));
     $this->aData['userCpanelItems'][] = array('label' => Yii::t('common', 'Control panel'), 'url' => array('/usercpanel/main/index'), 'visible' => Yii::app()->user->checkAccess('backend_access') === false, 'items' => $subItems, 'itemOptions' => array('class' => 'depth_zero'), 'submenuOptions' => array('class' => 'sub_menu_dropdown'));
     if (!Yii::app()->user->isGuest) {
         $user = HUser::getModel();
         $this->aData['userCpanelItems'][] = array('label' => '(' . $user->username . ') ' . tt('Logout', 'common'), 'url' => array('/site/logout'), 'itemOptions' => array('class' => 'depth_zero'));
     }
     $this->aData['topMenuItems'] = $this->infoPages;
     // comparison list
     if (issetModule('comparisonList')) {
         if (!Yii::app()->user->isGuest) {
             $resultCompare = ComparisonList::model()->findAllByAttributes(array('user_id' => Yii::app()->user->id));
         } else {
             $resultCompare = ComparisonList::model()->findAllByAttributes(array('session_id' => Yii::app()->session->sessionId));
         }
         if ($resultCompare) {
             foreach ($resultCompare as $item) {
                 $this->apInComparison[] = $item->apartment_id;
             }
         }
     }
     $this->currentUserIp = Yii::app()->request->getUserHostAddress();
     $this->currentUserIpLong = ip2long($this->currentUserIp);
     $this->datePickerLang = Yii::app()->language;
     if ($this->datePickerLang == 'en') {
         $this->datePickerLang = 'en-GB';
     }
     if (demo()) {
         if (isset($_GET['theme']) && array_key_exists($_GET['theme'], Themes::getColorThemesList())) {
             $theme = $_GET['theme'];
             $cookie = new CHttpCookie('theme', $theme);
             $cookie->expire = time() + 86400;
             Yii::app()->request->cookies['theme'] = $cookie;
         }
     }
     parent::init();
 }
开发者ID:barricade86,项目名称:raui,代码行数:74,代码来源:Controller.php

示例3: array

<div class="form">

    <?php 
$form = $this->beginWidget('CustomForm', array('id' => 'Slider-form', 'enableClientValidation' => false, 'htmlOptions' => array('enctype' => 'multipart/form-data')));
?>

    <?php 
echo $form->errorSummary($model);
?>

    <div class="rowold">
        <?php 
echo $form->labelEx($model, 'color_theme');
?>
        <?php 
echo $form->dropDownList($model, 'color_theme', Themes::getColorThemesList(), array('style' => 'width: 400px;'));
?>
        <?php 
echo $form->error($model, 'color_theme');
?>
    </div>

    <div class="rowold">
        <?php 
echo $form->labelEx($model, 'upload_img');
?>
        <div class="padding-bottom10">
            <span class="label label-info">
                <?php 
echo Yii::t('module_slider', 'Supported file: {supportExt}.', array('{supportExt}' => $model->supportExt)) . '';
?>
开发者ID:barricade86,项目名称:raui,代码行数:31,代码来源:update.php

示例4: array

			<?php 
}
?>
            <li>
                <?php 
echo CHtml::link(Yii::t('module_install', 'About product', array(), 'messagesInFile', Yii::app()->language), Yii::app()->language == 'ru' ? '#' : '#', array('class' => 'button cyan'));
?>
            </li>
            <li>
                <?php 
echo CHtml::link(Yii::t('module_install', 'Contact us', array(), 'messagesInFile', Yii::app()->language), Yii::app()->language == 'ru' ? '#' : '#', array('class' => 'button cyan'));
?>
            </li>
            <li>
                <?php 
$themeList = Themes::getColorThemesList();
echo Yii::t('module_install', 'Color theme', array(), 'messagesInFile', Yii::app()->language) . ': ';
echo CHtml::dropDownList('theme', Themes::getParam('color_theme'), $themeList, array('onchange' => 'js: changeTheme(this.value);'));
?>
            </li>
        </ul>
    </div>
</div>

<script type="text/javascript">
    function changeTheme(theme){
        location.href = URL_add_parameter(location.href, 'theme', theme);
    }

    function URL_add_parameter(url, param, value){
        var hash       = {};
开发者ID:barricade86,项目名称:raui,代码行数:31,代码来源:ads-block.php


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