public function run()
{
if (empty($this->pluginOptions['url'])) {
throw new InvalidConfigException("The 'pluginOptions[\"url\"]' property has not been set.");
}
if (empty($this->pluginOptions['depends'])) {
throw new InvalidConfigException("The 'pluginOptions[\"depends\"]' property must be set."); // and must be an array of dependent dropdown element identifiers.");
}
// ========================
// INSERT FOR TABULAR FORM
// ========================
if(!is_array($this->pluginOptions['depends']))
{
$this->pluginOptions['depends']($this->model);
}
if (empty($this->options['class'])) {
$this->options['class'] = 'form-control';
}
if ($this->type === self::TYPE_SELECT2) {
Config::checkDependency('select2\Select2', 'yii2-widget-select2', 'for dependent dropdown for Select2');
}
if ($this->type !== self::TYPE_SELECT2 && !empty($this->options['placeholder'])) {
$this->data = ['' => $this->options['placeholder']] + $this->data;
}
$this->registerAssets();
}
but the result reflects NULL.
How can I access or fill the model object? I though the parent widget class a resoponsible for?