public function executeCommenting(sfWebRequest $request) { $this->forward404Unless($request->isXmlHttpRequest()); $commentableObject = PropelQuery::from($request->getParameter('commentable_model'))->findPk($request->getParameter('commentable_id')); $comments = sfNestedCommentTools::getComments($commentableObject, $request); return $this->renderPartial('sfNestedComment/comment_list', array('comments' => $comments)); }
public function executeShowComments(sfWebRequest $request) { $this->comments = sfNestedCommentTools::getComments($this->object, $request); $this->commentForm = sfNestedCommentTools::createCommentForm($this->object, $this->getUser()); }