FriendsOfSymfony / FOSCommentBundle

Threaded comments for Symfony
http://friendsofsymfony.github.com/
MIT License
462 stars 230 forks source link

method 'onOpenThreadSuccess' in the 'ThreadController' #619

Open rimoi opened 6 years ago

rimoi commented 6 years ago

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: