public function updateErrorBox($form, $result, $errors)
    {
        if (($form->isSubmitted() && $result !== true) || count($errors) > 0) {
            if (is_string($result)) {
                $this->addError(new Error(
                    Error::GENERAL_ERROR,
                    $result
                ));
            } else if (count($errors) > 0) {
                foreach ($errors as $error) {
                    $this->addError($error);
                }
            } else {
                $this->addError(new Error(
                    Error::UNKNOWN_ERROR,
                    ''
                ));
            }
        }
    }
public function updateErrorBox($form, $result, $errors)
    {
        if (($form->isSubmitted() && $result !== true) || count($errors) > 0) {
            if (is_string($result)) {
                $this->addError(new Error(
                    Error::GENERAL_ERROR,
                    $result
                ));
            } else if (count($errors) > 0) {
                foreach ($errors as $error) {
                    $this->addError($error);
                }
            } else {
                $this->addError(new Error(
                    Error::UNKNOWN_ERROR,
                    ''
                ));
            }
        }
    }
public function updateErrorBox ( $ form , $ result , $ errors ) { if ( ( $ form -> isSubmitted ( ) && $ result !== true ) || count ( $ errors ) > 0 ) { if ( is_string ( $ result ) ) { $ this -> addError ( new Error ( Error :: GENERAL_ERROR , $ result ) ) ; } else if ( count ( $ errors ) > 0 ) { foreach ( $ errors as $ error ) { $ this -> addError ( $ error ) ; } } else { $ this -> addError ( new Error ( Error :: UNKNOWN_ERROR , '' ) ) ; } } }
Updates the error box with the form data, result or error objects

@param \Zepi\Web\UserInterface\Form\Form $form
@param boolean|string $result
@param array $errors
Updates the error box with the form data result or error objects