src/Forms/Schema/FormSchema.php
public function getSchema(Form $form)
    {
        $schema = [
            'name' => $form->getName(),
            'id' => $form->FormName(),
            'action' => $form->FormAction(),
            'method' => $form->FormMethod(),
            'attributes' => $form->getAttributes(),
            'data' => [],
            'fields' => [],
            'actions' => []
        ];

        /** @var FormField $action */
        foreach ($form->Actions() as $action) {
            $schema['actions'][] = $action->getSchemaData();
        }

        /** @var FormField $field */
        foreach ($form->Fields() as $field) {
            $schema['fields'][] = $field->getSchemaData();
        }

        return $schema;
    }
public function getSchema(Form $form)
    {
        $schema = [
            'name' => $form->getName(),
            'id' => $form->FormName(),
            'action' => $form->FormAction(),
            'method' => $form->FormMethod(),
            'attributes' => $form->getAttributes(),
            'data' => [],
            'fields' => [],
            'actions' => []
        ];

        /** @var FormField $action */
        foreach ($form->Actions() as $action) {
            $schema['actions'][] = $action->getSchemaData();
        }

        /** @var FormField $field */
        foreach ($form->Fields() as $field) {
            $schema['fields'][] = $field->getSchemaData();
        }

        return $schema;
    }
public function getSchema ( Form $ form ) { $ schema = [ 'name' => $ form -> getName ( ) , 'id' => $ form -> FormName ( ) , 'action' => $ form -> FormAction ( ) , 'method' => $ form -> FormMethod ( ) , 'attributes' => $ form -> getAttributes ( ) , 'data' => [ ] , 'fields' => [ ] , 'actions' => [ ] ] ; /** @var FormField $action */ foreach ( $ form -> Actions ( ) as $ action ) { $ schema [ 'actions' ] [ ] = $ action -> getSchemaData ( ) ; } /** @var FormField $field */ foreach ( $ form -> Fields ( ) as $ field ) { $ schema [ 'fields' ] [ ] = $ field -> getSchemaData ( ) ; } return $ schema ; }
Gets the schema for this form as a nested array.

@param Form $form
@return array
Gets the schema for this form as a nested array .