/** * Setup column types in provided columns object * @param $columns static|\stdClass */ static function setUpColumns($columns) { $columns->id = Column::AUTO_ID; $columns->sessionId = Session::columns()->id; $columns->seriesId = Series::columns()->id; $columns->value = Column::FLOAT; $columns->param = Column::FLOAT; }
public static function session() { $layout = new Layout(); $id = $_GET['id']; if (!$id) { return self::notFound(); } /** @var Session $session */ $session = Session::find($id); if (!$session) { return self::notFound(); } /** @var Tag[] $tags */ $tags = Series::find()->select(Tag::columns())->leftJoin('? ON ? = ?', SeriesTag::table(), SeriesTag::columns()->seriesId, Series::columns()->id)->leftJoin('? ON ? = ?', Tag::table(), Tag::columns()->id, SeriesTag::columns()->tagId)->where('? = ?', Series::columns()->sessionId, $session->id)->groupBy(Tag::columns()->id)->bindResultClass(Tag::className())->query()->fetchAll(); $layout->setList(new TagsFilter($tags)); $layout->render(); return true; }
/** * Required setup column types in provided columns object * @param $columns static|\stdClass */ static function setUpColumns($columns) { $columns->seriesId = Series::columns()->id; $columns->tagId = Tag::columns()->id; }