src/Forms/Schema/FormSchema.php
public function getState(Form $form)
    {
        $state = [
            'id' => $form->FormName(),
            'fields' => [],
            'messages' => [],
            'notifyUnsavedChanges' => $form->getNotifyUnsavedChanges(),
        ];

        // flattened nested fields are returned, rather than only top level fields.
        $state['fields'] = array_merge(
            $this->getFieldStates($form->Fields()),
            $this->getFieldStates($form->Actions())
        );

        if ($message = $form->getSchemaMessage()) {
            $state['messages'][] = $message;
        }

        return $state;
    }
public function getState(Form $form)
    {
        $state = [
            'id' => $form->FormName(),
            'fields' => [],
            'messages' => [],
            'notifyUnsavedChanges' => $form->getNotifyUnsavedChanges(),
        ];

        // flattened nested fields are returned, rather than only top level fields.
        $state['fields'] = array_merge(
            $this->getFieldStates($form->Fields()),
            $this->getFieldStates($form->Actions())
        );

        if ($message = $form->getSchemaMessage()) {
            $state['messages'][] = $message;
        }

        return $state;
    }
public function getState ( Form $ form ) { $ state = [ 'id' => $ form -> FormName ( ) , 'fields' => [ ] , 'messages' => [ ] , 'notifyUnsavedChanges' => $ form -> getNotifyUnsavedChanges ( ) , ] ; // flattened nested fields are returned, rather than only top level fields. $ state [ 'fields' ] = array_merge ( $ this -> getFieldStates ( $ form -> Fields ( ) ) , $ this -> getFieldStates ( $ form -> Actions ( ) ) ) ; if ( $ message = $ form -> getSchemaMessage ( ) ) { $ state [ 'messages' ] [ ] = $ message ; } return $ state ; }
Gets the current state of this form as a nested array.

@param Form $form
@return array
Gets the current state of this form as a nested array .