Permalink
Browse files

Merge pull request #2066 from Ragazzo/CComponent-attachBehavior-metho…

…d-fix

Added more docs about second param for CComponent::attachBehavior()
  • Loading branch information...
2 parents a714f1e + 4bd3bfb commit f69e1fc6f2cd573f9f1956dfa7e8803926dd38ff @samdark samdark committed Feb 2, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 framework/base/CComponent.php
@@ -318,6 +318,8 @@ public function detachBehaviors()
* @param string $name the behavior's name. It should uniquely identify this behavior.
* @param mixed $behavior the behavior configuration. This is passed as the first
* parameter to {@link YiiBase::createComponent} to create the behavior object.
+ * You also can pass already created behavior instance (new behavior will replace already created
+ * behavior with the same given name if it is exists).
* @return IBehavior the behavior object
*/
public function attachBehavior($name,$behavior)

0 comments on commit f69e1fc

Please sign in to comment.