Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 /**
  * 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;
 }