From 6f11f9e349ab86c9659fc199b175e49520061d7c Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Tue, 9 Apr 2013 22:28:56 -0400 Subject: [PATCH] script WIP --- framework/base/ViewContent.php | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/framework/base/ViewContent.php b/framework/base/ViewContent.php index 265da84..6a3b489 100644 --- a/framework/base/ViewContent.php +++ b/framework/base/ViewContent.php @@ -17,7 +17,32 @@ class ViewContent extends Component const POS_BEGIN = 2; const POS_END = 3; - public $packages; + /** + * @var array + * + * Each asset bundle should be declared with the following structure: + * + * ~~~ + * array( + * 'basePath' => '...', + * 'baseUrl' => '...', // if missing, the bundle will be published to the "www/assets" folder + * 'js' => array( + * 'js/main.js', + * 'js/menu.js', + * 'js/base.js' => self::POS_HEAD, + * 'css' => array( + * 'css/main.css', + * 'css/menu.css', + * ), + * 'depends' => array( + * 'jquery', + * 'yii', + * 'yii/treeview', + * ), + * ) + * ~~~ + */ + public $bundles; public $title; public $metaTags; @@ -43,6 +68,11 @@ class ViewContent extends Component $this->jsFiles = null; } + public function registerBundle($name) + { + + } + public function getMetaTag($key) { return isset($this->metaTags[$key]) ? $this->metaTags[$key] : null;