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); }
public function actionRead($id) { $this->table = $this->db->table($this->data); $this->setDatabaseForData(); $this->setDatabaseForDate(); $this->setDatabaseForSeries(); parent::actionRead(NULL); }
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); }
public function actionRead($id) { $tables = ["beer", "brewery", "consumption", "credit", "keg", "news", "tap", "user"]; parent::actionRead($id); }
public function actionRead($id) { $this->table = $this->table->select('tap.*, SUM(keg:consumption.volume) AS poured'); parent::actionRead($id); }
/** * relation: keg/<id>/consumption * outputs consumed ml from keg * @param int $relationId */ public function actionReadConsumption($relationId) { parent::actionRead($relationId); }