public function __construct($form)
{
parent::__construct($form);
$config = \jApp::config()->{$this->formConfig};
if (isset($this->pluginsConf['root'])) {
//first the builder conf
$pluginName = $this->pluginsConf['root'];
} elseif (isset($config['root'])) {
//then the ini conf
$pluginName = $config['root'];
} else {
//finaly the control type
$pluginName = $this->formType;
}
$className = $pluginName . 'FormWidget';
$this->rootWidget = \jApp::loadPlugin($pluginName, 'formwidget', '.formwidget.php', $className);
if (!$this->rootWidget) {
throw new \Exception('Unknown root widget plugin ' . $pluginName);
}
}