original_string: 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'));
      }
code: 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'));
      }
code_tokens: 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' ) ) ; }
docstring: Prepares error messages for FormHelper.
  
  @param \Comment\Model\Entity\Comment $comment The invalidated comment entity
  to extract error messages
  @return void
docstring_tokens: Prepares error messages for FormHelper .