|
Class TBehavior
TBehavior is a convenient base class for behavior classes.
-
TComponent
-
TBehavior
implements
IBehavior
Methods summary
public
array
|
#
events( )
Declares events and the corresponding event handler methods. The events are
defined by the owner component, while the handler methods by the
behavior class. The handlers will be attached to the corresponding events when
the behavior is attached to the owner component; and they will be
detached from the events when the behavior is detached from the component.
Declares events and the corresponding event handler methods. The events are
defined by the owner component, while the handler methods by the
behavior class. The handlers will be attached to the corresponding events when
the behavior is attached to the owner component; and they will be
detached from the events when the behavior is detached from the component.
Returns
array events (array keys) and the corresponding event handler methods (array values).
|
public
|
#
attach( TComponent $owner )
Attaches the behavior object to the component. The default implementation
will set the owner property and attach event handlers as declared in
TBehavior::events() . Make sure you call the parent implementation if you override
this method.
Attaches the behavior object to the component. The default implementation
will set the owner property and attach event handlers as declared in
TBehavior::events() . Make sure you call the parent implementation if you override
this method.
Parameters
- $owner
TComponent
the component that this behavior is to be attached to.
Implementation of
|
public
|
#
detach( TComponent $owner )
Detaches the behavior object from the component. The default implementation
will unset the owner property and detach event handlers declared in
TBehavior::events() . Make sure you call the parent implementation if you override
this method.
Detaches the behavior object from the component. The default implementation
will unset the owner property and detach event handlers declared in
TBehavior::events() . Make sure you call the parent implementation if you override
this method.
Parameters
- $owner
TComponent
the component that this behavior is to be detached from.
Implementation of
|
public
TComponent
|
#
getOwner( )
Returns
TComponent
the owner component that this behavior is attached to.
|
public
boolean
|
#
getEnabled( )
Returns
boolean whether this behavior is enabled
Implementation of
|
public
|
#
setEnabled( boolean $value )
Parameters
- $value
boolean whether this behavior is enabled
Implementation of
|
Methods inherited from TComponent
__call(),
__construct(),
__destruct(),
__get(),
__isset(),
__set(),
__sleep(),
__unset(),
__wakeup(),
addParsedObject(),
asa(),
attachBehavior(),
attachBehaviors(),
attachClassBehavior(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
clearBehaviors(),
createdOnTemplate(),
detachBehavior(),
detachBehaviors(),
detachClassBehavior(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
evaluateStatements(),
fxAttachClassBehavior(),
fxDetachClassBehavior(),
getAutoGlobalListen(),
getBehaviorsEnabled(),
getClassHierarchy(),
getEventHandlers(),
getListeningToGlobalEvents(),
getSubProperty(),
hasEvent(),
hasEventHandler(),
hasProperty(),
isa(),
listen(),
raiseEvent(),
setSubProperty(),
unlisten()
|
|