classes/ControlLibrary.php
public function registerControl($code, $name, $description, $controlGroup, $icon, $properties, $designTimeProviderClass)
    {
        if (!$designTimeProviderClass) {
            $designTimeProviderClass = self::DEFAULT_DESIGN_TIME_PROVIDER;
        }

        $this->controls[$code] = [
            'group' => $controlGroup,
            'name' => $name,
            'description' => $description,
            'icon' => $icon,
            'properties' => $properties,
            'designTimeProvider' => $designTimeProviderClass
        ];
    }
public function registerControl($code, $name, $description, $controlGroup, $icon, $properties, $designTimeProviderClass)
    {
        if (!$designTimeProviderClass) {
            $designTimeProviderClass = self::DEFAULT_DESIGN_TIME_PROVIDER;
        }

        $this->controls[$code] = [
            'group' => $controlGroup,
            'name' => $name,
            'description' => $description,
            'icon' => $icon,
            'properties' => $properties,
            'designTimeProvider' => $designTimeProviderClass
        ];
    }
public function registerControl ( $ code , $ name , $ description , $ controlGroup , $ icon , $ properties , $ designTimeProviderClass ) { if ( ! $ designTimeProviderClass ) { $ designTimeProviderClass = self :: DEFAULT_DESIGN_TIME_PROVIDER ; } $ this -> controls [ $ code ] = [ 'group' => $ controlGroup , 'name' => $ name , 'description' => $ description , 'icon' => $ icon , 'properties' => $ properties , 'designTimeProvider' => $ designTimeProviderClass ] ; }
Registers a control.
@param string $code Specifies the control code, for example "codeeditor".
@param string $name Specifies the control name, for example "Code editor".
@param string $description Specifies the control descritpion, can be empty.
@param string|integer $controlGroup 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.
@param string $icon Specifies the control icon for the Control Palette.
@see http://octobercms.com/docs/ui/icon
@param array $properties 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.
@param string $designTimeProviderClass 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.
Registers a control .