(Fixes issue 2914) Added CClientScript::addPackage

This commit is contained in:
alexander.makarow
2011-12-26 23:43:08 +00:00
parent 12d0472aa3
commit ab59fd888f
2 changed files with 18 additions and 3 deletions

View File

@@ -619,10 +619,10 @@ class CClientScript extends CApplicationComponent
/**
* Registers a meta tag that will be inserted in the head section (right before the title element) of the resulting page.
*
*
* <b>Note:</b>
* Meta tags with same attributes will be rendered more then once if called with different values.
*
*
* <b>Example:</b>
* <pre>
* $cs->registerMetaTag('example', 'description', null, array('lang' => 'en'));
@@ -746,4 +746,18 @@ class CClientScript extends CApplicationComponent
if(($controller=Yii::app()->getController())!==null)
$controller->recordCachingAction($context,$method,$params);
}
}
/**
* Adds a package to packages list.
*
* @param string $name the name of the script package.
* @param array $definition the definition array of the script package,
* @see CClientScript::packages.
*
* @since 1.1.9
*/
public function addPackage($name,$definition)
{
$this->packages[$name]=$definition;
}
}