protected function _setErrors(Comment $comment)
    {
        $arrayContext = $this->config('arrayContext');
        foreach ((array)$comment->errors() as $field => $msg) {
            $arrayContext['errors']['comment'][$field] = $msg;
        }
        $this->config('arrayContext', $arrayContext);
        $this->_controller->set('_commentFormContext', $this->config('arrayContext'));
    }
protected function _setErrors(Comment $comment)
    {
        $arrayContext = $this->config('arrayContext');
        foreach ((array)$comment->errors() as $field => $msg) {
            $arrayContext['errors']['comment'][$field] = $msg;
        }
        $this->config('arrayContext', $arrayContext);
        $this->_controller->set('_commentFormContext', $this->config('arrayContext'));
    }
protected function _setErrors ( Comment $ comment ) { $ arrayContext = $ this -> config ( 'arrayContext' ) ; foreach ( ( array ) $ comment -> errors ( ) as $ field => $ msg ) { $ arrayContext [ 'errors' ] [ 'comment' ] [ $ field ] = $ msg ; } $ this -> config ( 'arrayContext' , $ arrayContext ) ; $ this -> _controller -> set ( '_commentFormContext' , $ this -> config ( 'arrayContext' ) ) ; }
Prepares error messages for FormHelper.

@param \Comment\Model\Entity\Comment $comment The invalidated comment entity
to extract error messages
@return void
Prepares error messages for FormHelper .