public function findallAction() { if ($comment_id = $this->getRequest()->getParam('comment_id')) { $comment = new Comment_Model_Comment(); $comment->find($comment_id); $customer = new Customer_Model_Customer(); $noLogo = $customer->getImageLink(); if ($comment->getId()) { $answer = new Comment_Model_Answer(); $answers = $answer->findByComment($comment->getId()); $data = array(); foreach ($answers as $answer) { $data[] = array("id" => $answer->getId(), "author" => $answer->getCustomerName(), "picture" => $noLogo, "message" => $answer->getText(), "created_at" => $this->_durationSince($answer->getCreatedAt())); } $this->_sendHtml($data); } } }