Class \Prado\Util\Behaviors\TParameterizeBehavior
TParameterizeBehavior class.
TParameterizeBehavior sets a specific Property on the owner object to a specific application parameter. It also can install a behavior on the Application parameters to apply any changes to the application parameter to then route the change to the property by setting the RouteBehaviorName.
<behavior name="PageThemeParameter" Class="Prado\Util\Behaviors\TParameterizeBehavior" AttachTo="Page" Parameter="ThemeName" Property="Theme" DefaultValue="Basic"/>
<behavior name="PageTitle" Class="Prado\Util\Behaviors\TParameterizeBehavior" AttachTo="Page" Parameter="TPageTitle" Property="Title" Localize="true"/>
<behavior name="AuthManagerExpireParameter" Class="Prado\Util\Behaviors\TParameterizeBehavior" AttachTo="module:auth" Parameter="prop:TAuthManager.AuthExpire" Property="AuthExpire" RouteBehaviorName="TAuthManagerAuthExpireRouter" />
<behavior name="TSecurityManagerValidationKey" Class="Prado\Util\Behaviors\TParameterizeBehavior" AttachToClass="TSecurityManager" Parameter="prop:TSecurityManager.ValidationKey" Property="ValidationKey" />
<behavior name="TSecurityManagerEncryptionKey" Class="Prado\Util\Behaviors\TParameterizeBehavior" AttachToClass="TSecurityManager" Parameter="prop:TSecurityManager.EncryptionKey" Property="EncryptionKey" />
Class hierarchy
- \Prado\Util\Behaviors\TParameterizeBehavior
- \Prado\Util\TBehavior implements IBehavior
- \Prado\Util\TBaseBehavior implements IBaseBehavior uses TPriorityPropertyTrait
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 4.2.0
public
|
attach(object $owner) : mixed
This method sets the Owner Property to the Application Parameter of Parameter. When
{@see getRouteBehaviorName} is set, a {@see \Prado\Util\Behaviors\TMapRouteBehavior} is attached to
the Application Parameter on the key so any changes are also routed to the Property.
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
setEnabled(bool $enabled) : mixed
This attaches and detaches the routing behavior on the Application Parameters.
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
protected
|
\Prado\TApplicationComponent::FX_CACHE_FILE, \Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |