|
|
@ -33,7 +33,6 @@ class Component extends \yii\base\Object |
|
|
|
* This method will check in the following order and act accordingly: |
|
|
|
* This method will check in the following order and act accordingly: |
|
|
|
* |
|
|
|
* |
|
|
|
* - a property defined by a getter: return the getter result |
|
|
|
* - a property defined by a getter: return the getter result |
|
|
|
* - a behavior: return the behavior object |
|
|
|
|
|
|
|
* - a property of a behavior: return the behavior property value |
|
|
|
* - a property of a behavior: return the behavior property value |
|
|
|
* |
|
|
|
* |
|
|
|
* Do not call this method directly as it is a PHP magic method that |
|
|
|
* Do not call this method directly as it is a PHP magic method that |
|
|
@ -67,7 +66,8 @@ class Component extends \yii\base\Object |
|
|
|
* This method will check in the following order and act accordingly: |
|
|
|
* This method will check in the following order and act accordingly: |
|
|
|
* |
|
|
|
* |
|
|
|
* - a property defined by a setter: set the property value |
|
|
|
* - a property defined by a setter: set the property value |
|
|
|
* - an event: attach the handler to the event |
|
|
|
* - an event in the format of "on xyz": attach the handler to the event "xyz" |
|
|
|
|
|
|
|
* - a behavior in the format of "as xyz": attach the behavior named as "xyz" |
|
|
|
* - a property of a behavior: set the behavior property value |
|
|
|
* - a property of a behavior: set the behavior property value |
|
|
|
* |
|
|
|
* |
|
|
|
* Do not call this method directly as it is a PHP magic method that |
|
|
|
* Do not call this method directly as it is a PHP magic method that |
|
|
@ -218,9 +218,9 @@ class Component extends \yii\base\Object |
|
|
|
* |
|
|
|
* |
|
|
|
* ~~~ |
|
|
|
* ~~~ |
|
|
|
* 'behaviorName' => array( |
|
|
|
* 'behaviorName' => array( |
|
|
|
* 'class' => 'BehaviorClass', |
|
|
|
* 'class' => 'BehaviorClass', |
|
|
|
* 'property1' => 'value1', |
|
|
|
* 'property1' => 'value1', |
|
|
|
* 'property2' => 'value2', |
|
|
|
* 'property2' => 'value2', |
|
|
|
* ) |
|
|
|
* ) |
|
|
|
* ~~~ |
|
|
|
* ~~~ |
|
|
|
* |
|
|
|
* |
|
|
@ -284,10 +284,10 @@ class Component extends \yii\base\Object |
|
|
|
* some examples: |
|
|
|
* some examples: |
|
|
|
* |
|
|
|
* |
|
|
|
* ~~~ |
|
|
|
* ~~~ |
|
|
|
* function($event) { ... } // anonymous function |
|
|
|
* function($event) { ... } // anonymous function |
|
|
|
* array($object, 'handleClick') // $object->handleClick() |
|
|
|
* array($object, 'handleClick') // $object->handleClick() |
|
|
|
* array('Page', 'handleClick') // Page::handleClick() |
|
|
|
* array('Page', 'handleClick') // Page::handleClick() |
|
|
|
* 'handleClick' // global function handleClick() |
|
|
|
* 'handleClick' // global function handleClick() |
|
|
|
* ~~~ |
|
|
|
* ~~~ |
|
|
|
* |
|
|
|
* |
|
|
|
* An event handler must be defined with the following signature, |
|
|
|
* An event handler must be defined with the following signature, |
|
|
|