theme.php
Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 class ThemeView extends View {
00035
00036
00037
00038
00039
00040 var $themeElement = null;
00041
00042
00043
00044
00045
00046 var $themeLayout = null;
00047
00048
00049
00050
00051
00052 var $themePath = null;
00053
00054
00055
00056
00057
00058
00059 function __construct (&$controller) {
00060 parent::__construct($controller);
00061 $this->theme =& $controller->theme;
00062
00063 if (!empty($this->theme)) {
00064 if (is_dir(WWW_ROOT . 'themed' . DS . $this->theme)) {
00065 $this->themeWeb = 'themed/'. $this->theme .'/';
00066 }
00067
00068 $this->themeElement = 'themed'. DS . $this->theme . DS .'elements'. DS;
00069 $this->themeLayout = 'themed'. DS . $this->theme . DS .'layouts'. DS;
00070 $this->themePath = 'themed'. DS . $this->theme . DS;
00071 }
00072 }
00073
00074
00075
00076
00077
00078
00079
00080
00081 function _paths($plugin = null, $cached = true) {
00082 $paths = parent::_paths($plugin, $cached);
00083
00084 if (!empty($this->theme)) {
00085 $count = count($paths);
00086 for ($i = 0; $i < $count; $i++) {
00087 $themePaths[] = $paths[$i] . 'themed'. DS . $this->theme . DS;
00088 }
00089 $paths = array_merge($themePaths, $paths);
00090 }
00091
00092 if(empty($this->__paths)) {
00093 $this->__paths = $paths;
00094 }
00095
00096 return $paths;
00097 }
00098 }
00099 ?>