src/forms/EmployeeForm.php
public function save()
    {
        $collection = $this->getContactsCollection();

        try {
            $contractSaved = true;
            $contactsSaved = $collection->save();

            if ($this->getContract() !== null) {
                $this->getContract()->save();
            }

            return $contactsSaved && $contractSaved;
        } catch (ResponseErrorException $e) {
            return $e->getMessage();
        }
    }
public function save()
    {
        $collection = $this->getContactsCollection();

        try {
            $contractSaved = true;
            $contactsSaved = $collection->save();

            if ($this->getContract() !== null) {
                $this->getContract()->save();
            }

            return $contactsSaved && $contractSaved;
        } catch (ResponseErrorException $e) {
            return $e->getMessage();
        }
    }
public function save ( ) { $ collection = $ this -> getContactsCollection ( ) ; try { $ contractSaved = true ; $ contactsSaved = $ collection -> save ( ) ; if ( $ this -> getContract ( ) !== null ) { $ this -> getContract ( ) -> save ( ) ; } return $ contactsSaved && $ contractSaved ; } catch ( ResponseErrorException $ e ) { return $ e -> getMessage ( ) ; } }
Saves all model of the form.

@return bool
Saves all model of the form .