PATH:
home
/
letacommog
/
letaweb
/
admin
/
models
/
subsite_models
<?php class BSkins extends BActiveRecord { public static function model($className = __CLASS__) { return parent::model($className); } public function tableName() { return '{{skins}}'; } public function relations() { return array( // 'main_category'=>array(self::BELONGS_TO, 'BNewsCategory', 'main_category_id'), ); } public static $color_palette; public static function getColorPalette() { if (isset(self::$color_palette)) { return self::$color_palette; } $skin_file_name = 'common_skin'; $skin_file_path = Yii::app()->site->model->getFilePath('css', $skin_file_name, '.css'); $content = Functions::readCSSContentFromFile($skin_file_path); $palette = array(); foreach ($content as $css_rule) { for ($i = 0; $i <= 24;++$i) { if ($css_rule['selector'] == '.color-'.$i) { foreach ($css_rule['selector_body'] as $propery) { if ($propery['property'] == 'color') { $palette[] = $propery['value']; } } } } if (sizeof($palette) == 25) { break; } } //print_r($palette); return $palette; } public $fmodule; public function getPagedList($pageSize = 10, $start = 0,$order='') { $criteria = new CDbCriteria(); $fmodule = trim($this->fmodule); if (strlen($fmodule)) { $criteria->compare('type', $fmodule); } $criteria->order = $order; return new ActiveDataProvider('BSkins', array( 'criteria' => $criteria, 'pagination' => array( 'pageSize' => $pageSize, 'start'=>$start, 'class' => 'Pagination', ), )); } }
[+]
..
[-] BTag.php
[edit]
[-] BActiveRecord.php
[edit]
[-] BModule.php
[edit]
[-] BPages.php
[edit]
[-] BComments.php
[edit]
[-] BNews_News_Category.php
[edit]
[-] BNewsModule.php
[edit]
[-] BAuthAssignment.php
[edit]
[-] BNewsCategory.php
[edit]
[-] BConfigurations.php
[edit]
[-] BPages_Elements.php
[edit]
[-] BNews_Comments.php
[edit]
[-] BNews_Categories.php
[edit]
[-] BUsers.php
[edit]
[-] BUserIdentity.php
[edit]
[-] BNews.php
[edit]
[-] BWebUser.php
[edit]
[+]
forms
[-] BColors.php
[edit]
[-] BSkins.php
[edit]
[-] BNews_Tag.php
[edit]
[-] BContributor_Invites.php
[edit]
[-] BContributor.php
[edit]