FOSCommentBundle icon indicating copy to clipboard operation
FOSCommentBundle copied to clipboard

method 'onOpenThreadSuccess' in the 'ThreadController'

Open rimoi opened this issue 8 years ago • 0 comments

hi,

Why in the ThreadController the value is : 'value' => !$form->getData()->isCommentable() instead of 'value' => $form->getData()->isCommentable()

   /**
    * Forwards the action to the open thread edit view on a successful form submission.
    *
    * @param FormInterface $form
    *
    * @return View
    */
   protected function onOpenThreadSuccess(FormInterface $form)
   {
       return View::createRouteRedirect('fos_comment_edit_thread_commentable', array('id' => $form->getData()->getId(), 'value' => !$form->getData()->isCommentable()));
   }

Because i overload the controller 'ThreadController', and i want to be able to store in my thread entity the author who has closed the thread. And because of it previous method I have in small problem :angry:

Thanks :smiley:

rimoi avatar Oct 26 '17 08:10 rimoi