コード例 #1
0
ファイル: NewsPresenter.php プロジェクト: klajmajk/futro
 public function actionRead($id)
 {
     if ($id === NULL) {
         $this->table->where('date_end IS NULL OR date_end > SUBTIME(NOW(), "24:00:00")');
     }
     parent::actionRead($id);
 }
コード例 #2
0
ファイル: StatPresenter.php プロジェクト: klajmajk/futro
 public function actionRead($id)
 {
     $this->table = $this->db->table($this->data);
     $this->setDatabaseForData();
     $this->setDatabaseForDate();
     $this->setDatabaseForSeries();
     parent::actionRead(NULL);
 }
コード例 #3
0
ファイル: UserPresenter.php プロジェクト: klajmajk/futro
 public function actionReadConsumption($relationId)
 {
     $this->metadata['total_overall'] = $this->table->sum('volume');
     $thisYear = date('Y') . '-01-01T00:00:00';
     $localTable = clone $this->table;
     $this->metadata['total_this_year'] = $localTable->where('date_add >= ?', $thisYear)->sum('volume');
     $this->table->order('id DESC');
     $this->deepListing = array('keg' => array('beer' => array('brewery')));
     parent::actionRead($relationId);
 }
コード例 #4
0
ファイル: SyncPresenter.php プロジェクト: klajmajk/futro
 public function actionRead($id)
 {
     $tables = ["beer", "brewery", "consumption", "credit", "keg", "news", "tap", "user"];
     parent::actionRead($id);
 }
コード例 #5
0
ファイル: TapPresenter.php プロジェクト: klajmajk/futro
 public function actionRead($id)
 {
     $this->table = $this->table->select('tap.*, SUM(keg:consumption.volume) AS poured');
     parent::actionRead($id);
 }
コード例 #6
0
ファイル: KegPresenter.php プロジェクト: klajmajk/futro
 /**
  * relation: keg/<id>/consumption
  * outputs consumed ml from keg
  * @param int $relationId
  */
 public function actionReadConsumption($relationId)
 {
     parent::actionRead($relationId);
 }