public function getComments() { $table = new Model_DbTable_Comments(); $select = $table->select(); $select->where('object_id = ?', $this->id); $select->where('model = ?', $this->_table->info('name')); $select->order('path ASC'); return $table->fetchAll($select); }
/** * Make widget content available for the view * * Implements {@link iPMS_Widget_Interface::widget()} * * @return array array of comments */ public function widget() { $model = new Model_DbTable_Comments(); $comments = $model->fetchAll(null, 'id', 5)->toArray(); return $comments; }