Class \Prado\Util\Behaviors\TBehaviorParameterLoader
TBehaviorParameterLoader class.
TBehaviorParameterLoader implements attaching Behaviors from Parameters before any work has been done. Here is an example of how to attach a behavior via parameter within an application.xml:
<application id="prado-app">
<parameters>
<parameter id="pagethemebehaviorloader" class="Prado\Util\Behaviors\TBehaviorParameterLoader" BehaviorName="testBehavior" BehaviorClass="Prado\Util\Behaviors\TParameterizeBehavior" Priority="10" AttachToClass="Prado\Web\UI\TPage" Parameter="ThemeName" Property="Theme" DefaultValue="ColoradoBlue2022" />
<parameters>
...
TBehaviorParameterLoader can be used in parameters to load behaviors through the application configuration parameters, TParameterModule, as well in each folder through the config.xml/php files.
Class hierarchy
Author: Brad Anderson <belisoful@icloud.com>Since: 4.2.0
public
|
__set(string $name, string $value) : mixed
magic method for storing the properties for the behavior. If there is no
set Property then it stores the property to set on the behavior.
|
public
|
attachModuleBehaviors(object $sender, TPage $page) : mixed
This method attaches page behaviors to the TPage handling the TPageService::OnPreInitPage event.
|
public
|
attachTPageBehaviors(object $sender, TPage $page) : mixed
This method attaches page behaviors to the TPage handling the TPageService::OnPreInitPage event.
|
public
|
attachTPageServiceHandler(object $sender, mixed $param) : mixed
TApplication::onBeginRequest Handler that adds {@see attachTPageBehaviors} to
TPageService::onPreRunPage. In turn, this attaches {@see attachTPageBehaviors}
to TPageService to then adds the page behaviors.
|
public
|
dyInit(null|mixed $config) : mixed
Install the behavior via dynamic event dyInit, called after a parameter
class is loaded in TParameterModule or TApplication configurations.
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
\Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |