use App\Models\Traits\PublicationSettings;
use Cubist\Backpack\Magic\BunchOfFields;
+use Cubist\Backpack\Magic\Fields\FormBigSection;
use Cubist\Backpack\Magic\Fields\FormSection;
use Cubist\Backpack\Magic\Fields\FormSeparator;
+use Cubist\Backpack\Magic\Fields\FormSuperSection;
use Cubist\Util\PHP;
class LegacyBookSettingsGenerate extends Base
$currentForm = null;
foreach ($this->getFields() as $field) {
+ if($field instanceof FormSuperSection){
+ continue;
+ }
if ($field instanceof FormSection) {
if (null !== $currentForm) {
$key = $currentForm['key'];
$f['datas'] = array_flip($field->getAttribute('options'));
}
}
+ $map = ['label' => 'label', 'default' => 'default'];
+ foreach ($map as $k => $v) {
+ $f[$k] = $field->getAttribute($v);
+ }
$fields[$field->getName()] = $f;
}
$forms[] = $currentForm;
'store_in' => 'settings',
'translatable' => false,
]);
+ $this->addField('tagcommander_event_page', Textarea::class, __('Nom de l\'évenement de vue de page'), [
+ 'v2' => '{"type":"text","default":"page","editable":true,"grade":3}',
+ 'default' => 'page',
+ 'fake' => true,
+ 'store_in' => 'settings',
+ 'translatable' => false,
+ ]);
$this->addField('tagcommander_default_vars', Textarea::class, 'Variables par défaut', [
'v2' => '{"type":"textarea","default":"","editable":true,"label":"Variables par d\\u00e9faut","grade":3}',
'default' => '',