PHP Класс RainLab\Builder\Classes\ControlLibrary

Автор: Alexey Bobkov, Samuel Georges
Наследование: use trait October\Rain\Support\Traits\Singleton
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$controls
$groupedControls

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
resolveControlGroupName ( $group )

Описание методов

getControlInfo() публичный Метод

Returns information about a control by its code.
public getControlInfo ( string $code ) : array
$code string Specifies the control code.
Результат array Returns an associative array or null if the control is not registered.

getStandardProperties() публичный Метод

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

listControls() публичный Метод

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.
Результат array

registerControl() публичный Метод

Registers a control.
См. также: 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 resolveControlGroupName ( $group )

Описание свойств

$controls защищенное свойство

protected $controls

$groupedControls защищенное свойство

protected $groupedControls