ControllerBehaviorLibrary
in package
Uses
Singleton
Manages Builder controller behavior library.
Tags
Table of Contents
- DEFAULT_DESIGN_TIME_PROVIDER = 'RainLab\Builder\Widgets\DefaultBehaviorDesignTimeProvider'
- $behaviors : mixed
- $instance : mixed
- __clone() : mixed
- __wakeup() : mixed
- forgetInstance() : mixed
- Forget this singleton's instance if it exists
- getBehaviorInfo() : mixed
- instance() : mixed
- Create a new instance of this singleton.
- listBehaviors() : mixed
- registerBehavior() : mixed
- Registers a controller behavior.
- __construct() : mixed
- Constructor.
- init() : mixed
- Initialize the singleton free from constructor parameters.
Constants
DEFAULT_DESIGN_TIME_PROVIDER
public
mixed
DEFAULT_DESIGN_TIME_PROVIDER
= 'RainLab\Builder\Widgets\DefaultBehaviorDesignTimeProvider'
Properties
$behaviors
protected
mixed
$behaviors
= null
$instance
protected
static mixed
$instance
Methods
__clone()
public
__clone() : mixed
Return values
mixed —__wakeup()
public
__wakeup() : mixed
Return values
mixed —forgetInstance()
Forget this singleton's instance if it exists
public
final static forgetInstance() : mixed
Return values
mixed —getBehaviorInfo()
public
getBehaviorInfo(mixed $behaviorClassName) : mixed
Parameters
- $behaviorClassName : mixed
Return values
mixed —instance()
Create a new instance of this singleton.
public
final static instance() : mixed
Return values
mixed —listBehaviors()
public
listBehaviors() : mixed
Return values
mixed —registerBehavior()
Registers a controller behavior.
public
registerBehavior(string $class, string $name, string $description, array<string|int, mixed> $properties, string $configFilePropertyName, string $designTimeProviderClass, string $configFileName[, array<string|int, mixed> $viewTemplates = [] ]) : mixed
Parameters
- $class : string
-
Specifies the behavior class name.
- $name : string
-
Specifies the behavior name, for example "Form behavior".
- $description : string
-
Specifies the behavior description.
- $properties : array<string|int, mixed>
-
Specifies the behavior properties. The property definitions should be compatible with Inspector properties, similarly to the Component properties: http://octobercms.com/docs/plugin/components#component-properties
- $configFilePropertyName : string
-
Specifies the name of the controller property that contains the configuration file name for the behavior.
- $designTimeProviderClass : string
-
Specifies the behavior design-time provider class name. The class should extend RainLab\Builder\Classes\BehaviorDesignTimeProviderBase. If the class is not provided, the default control design and design settings will be used.
- $configFileName : string
-
Default behavior configuration file name, for example config_form.yaml.
- $viewTemplates : array<string|int, mixed> = []
-
An array of view templates that are required for the behavior. The templates are used when a new controller is created. The templates should be specified as paths to Twig files in the format ['~/plugins/author/plugin/behaviors/behaviorname/templates/view.htm.tpl'].
Return values
mixed —__construct()
Constructor.
protected
final __construct() : mixed
Return values
mixed —init()
Initialize the singleton free from constructor parameters.
protected
init() : mixed