Backend\Traits\WidgetMaker

Widget Maker Trait

Adds widget based methods to a controller class, or a class that contains a $controller property referencing a controller.

Public methods

public Backend\Classes\FormWidgetBase makeFormWidget(string $class, mixed $fieldConfig=array(), array $widgetConfig=array())

Makes a form widget object with the supplied form field and widget configuration.

Parameters
  • string $class - Widget class name
  • mixed $fieldConfig - A field name, an array of config or a FormField object.
  • array $widgetConfig - An array of config.

public Backend\Classes\WidgetBase makeWidget(string $class, array $widgetConfig=array())

Makes a widget object with the supplied configuration file.

Parameters
  • string $class - Widget class name
  • array $widgetConfig - An array of config.