Permalink
Browse files

(Fixes issue 3153) CClientScript::addPackage() now returns CClientScr…

…ipt instance to support method chaining
  • Loading branch information...
1 parent c1538e5 commit 1302947f52643c92ea1e1d67e03ecabe10a942fc alexander.makarow committed Feb 9, 2012
Showing with 3 additions and 0 deletions.
  1. +1 −0 CHANGELOG
  2. +2 −0 framework/web/CClientScript.php
View
@@ -17,6 +17,7 @@ Version 1.1.10 work in progress
- Enh #3101: The methods of CSecurityManager do now work correctly for the case that mbstring.func_overload is in effect (Y!!)
- Enh #3112: Fixed the exception error display on ajax calls when YII_DEBUG is true (mdomba)
- Enh #3121: Added more rules for proper pluralization to the pluralize() method in CCodeModel and CConsoleCommand (mdomba)
+- Enh #3153: CClientScript::addPackage() now returns CClientScript instance to support method chaining (Sam Dark)
- Enh #3154: Removed file existance check to allow relative path and added additional headers option to xSendFile() (mdomba)
- Enh #3169: Added CSort::SORT_ASC and CSort::SORT_DESC (Sam Dark)
- Enh: Added CActiveForm::validateTabular() to simplify ajax validation for tabular input (mdomba)
@@ -744,11 +744,13 @@ protected function recordCachingAction($context,$method,$params)
* @param string $name the name of the script package.
* @param array $definition the definition array of the script package,
* @see CClientScript::packages.
+ * @return CClientScript the CClientScript object itself (to support method chaining, available since version 1.1.10).
*
* @since 1.1.9
*/
public function addPackage($name,$definition)
{
$this->packages[$name]=$definition;
+ return $this;
}
}

0 comments on commit 1302947

Please sign in to comment.