Class \Prado\Util\Behaviors\TGlobalClassAware
TGlobalClassAware class.
This behavior registers the handlers fxAttachClassBehavior
and fxDetachClassBehavior
of the owner to listen for dynamic changes to its class behaviors (after it is
instanced).
This should only be used when the TComponent is not TComponent::listen()ing or the handlers will be double added. Listening is turned on automatically with TComponent::getAutoGlobalListen() (returning true) for select classes.
Without this behavior (or listen), an instanced TComponent will not update its class behaviors when there is a change in the global class behaviors.
Class hierarchy
- \Prado\Util\Behaviors\TGlobalClassAware
- \Prado\Util\TBehavior implements IBehavior
- \Prado\Util\TBaseBehavior implements IBaseBehavior uses TPriorityPropertyTrait
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 4.3.0
protected
|
attachEventHandlers(TComponent $component) : bool
Attaches the component event handlers:
{@see \Prado\TComponent::fxAttachClassBehavior()} and {@see \Prado\TComponent::fxDetachClassBehavior()}
|
protected
|
detachEventHandlers(TComponent $component) : bool
Detaches the component event handlers:
{@see \Prado\TComponent::fxAttachClassBehavior()} and {@see \Prado\TComponent::fxDetachClassBehavior()}
|
\Prado\TApplicationComponent::FX_CACHE_FILE, \Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |