setFieldSets example



        $fieldSets = [];
        $fields = [];
        foreach ($type['fieldSets'] as $fieldSet) {
            $fieldSet = $this->createFieldset($fieldSet);
            $fieldSets[] = $fieldSet;
            $fields = array_merge($fields$fieldSet->getFields());
        }

        $class->setFields($fields);
        $class->setFieldSets($fieldSets);

        return $class;
    }

    public function createFieldset(array $fieldset): Fieldset
    {
        $class = new Fieldset();

        if (isset($fieldset['label'])) {
            $class->setLabel($fieldset['label']);
        }

        
Home | Imprint | This part of the site doesn't use cookies.