base\Component on()

on() public method Attaches an event handler to an event. The event handler must be a valid PHP callback. The following are some examples: function ($event) { ... } // anonymous function [$object, 'handleClick'] // $object->handleClick() ['Page', 'handleClick'] // Page::handleClick() 'handleClick' // global function handleClick() The event handler must be defined with the following signature, function ($event) where $event is an yii\base\E

base\Component off()

off() public method Detaches an existing event handler from this component. This method is the opposite of on(). See also on(). public boolean off ( $name, $handler = null )$name string Event name $handler callable The event handler to be removed. If it is null, all handlers attached to the named event will be removed. return boolean If a handler is found and detached

base\Component hasProperty()

hasProperty() public method Returns a value indicating whether a property is defined for this component. A property is defined if: the class has a getter or setter method associated with the specified name (in this case, property name is case-insensitive); the class has a member variable with the specified name (when $checkVars is true); an attached behavior has a property of the given name (when $checkBehaviors is true). See also: canGetProperty() canSetProperty() public boolean hasPrope

base\Component hasMethod()

hasMethod() public method Returns a value indicating whether a method is defined. A method is defined if: the class has a method with the specified name an attached behavior has a method with the given name (when $checkBehaviors is true). public boolean hasMethod ( $name, $checkBehaviors = true )$name string The property name $checkBehaviors boolean Whether to treat behaviors' methods as methods of this component return boolean Whether the property is defined

base\Component hasEventHandlers()

hasEventHandlers() public method Returns a value indicating whether there is any handler attached to the named event. public boolean hasEventHandlers ( $name )$name string The event name return boolean Whether there is any handler attached to the event.

base\Component getBehaviors()

getBehaviors() public method Returns all behaviors attached to this component. public yii\base\Behavior[] getBehaviors ( )return yii\base\Behavior[] List of behaviors attached to this component

base\Component getBehavior()

getBehavior() public method Returns the named behavior object. public null|yii\base\Behavior getBehavior ( $name )$name string The behavior name return null|yii\base\Behavior The behavior object, or null if the behavior does not exist

base\Component ensureBehaviors()

ensureBehaviors() public method Makes sure that the behaviors declared in behaviors() are attached to this component. public void ensureBehaviors ( )

base\Component detachBehaviors()

detachBehaviors() public method Detaches all behaviors from the component. public void detachBehaviors ( )

base\Component detachBehavior()

detachBehavior() public method Detaches a behavior from the component. The behavior's yii\base\Behavior::detach() method will be invoked. public null|yii\base\Behavior detachBehavior ( $name )$name string The behavior's name. return null|yii\base\Behavior The detached behavior. Null if the behavior does not exist.