public function formExtendFields($form)
    {
        $model = $form->model;
        $theme = $this->findThemeObject($model->theme);
        $config = $theme->getFormConfig();

        if ($fields = array_get($config, 'fields')) {
            $form->addFields($fields);
        }

        if ($fields = array_get($config, 'tabs.fields')) {
            $form->addTabFields($fields);
        }

        if ($fields = array_get($config, 'secondaryTabs.fields')) {
            $form->addSecondaryTabFields($fields);
        }
    }