示例#1
0
文件: Row.php 项目: hollusion/Netons
 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);
 }
示例#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;
 }