PHP Class RainLab\Builder\Classes\ControlLibrary

Author: Alexey Bobkov, Samuel Georges
Inheritance: use trait October\Rain\Support\Traits\Singleton
ファイルを表示 Open project: rainlab/builder-plugin Class Usage Examples

Protected Properties

Property Type Description
$controls
$groupedControls

Public Methods

Method Description
getControlInfo ( string $code ) : array Returns information about a control by its code.
getStandardProperties ( $excludeProperties = [], $addProperties = [] )
listControls ( boolean $returnGrouped = true ) : array Returns a list of all known form controls grouped by control groups.
registerControl ( string $code, string $name, string $description, string | integer $controlGroup, string $icon, array $properties, string $designTimeProviderClass ) Registers a control.

Protected Methods

Method Description
resolveControlGroupName ( $group )

Method Details

getControlInfo() public method

Returns information about a control by its code.
public getControlInfo ( string $code ) : array
$code string Specifies the control code.
return array Returns an associative array or null if the control is not registered.

getStandardProperties() public method

public getStandardProperties ( $excludeProperties = [], $addProperties = [] )

listControls() public method

Returns a list of all known form controls grouped by control groups.
public listControls ( boolean $returnGrouped = true ) : array
$returnGrouped boolean Indicates whether controls should be grouped in the result.
return array

registerControl() public method

Registers a control.
See also: http://octobercms.com/docs/ui/icon
public registerControl ( string $code, string $name, string $description, string | integer $controlGroup, string $icon, array $properties, string $designTimeProviderClass )
$code string Specifies the control code, for example "codeeditor".
$name string Specifies the control name, for example "Code editor".
$description string Specifies the control descritpion, can be empty.
$controlGroup string | integer Specifies the control group. Control groups are used to create tabs in the Control Palette in Form Builder. The group could one of the ControlLibrary::GROUP_ constants or a string.
$icon string Specifies the control icon for the Control Palette.
$properties array Specifies the control properties. The property definitions should be compatible with Inspector properties, similarly to the Component properties: http://octobercms.com/docs/plugin/components#component-properties Use the getStandardProperties() of the ControlLibrary to get the standard control properties.
$designTimeProviderClass string Specifies the control design-time provider class name. The class should extend RainLab\Builder\Classes\ControlDesignTimeProviderBase. If the class is not provided, the default control design and design settings will be used.

resolveControlGroupName() protected method

protected resolveControlGroupName ( $group )

Property Details

$controls protected_oe property

protected $controls

$groupedControls protected_oe property

protected $groupedControls