Esempio n. 1
0
 /**
  * Setup column types in provided columns object
  * @param $columns static|\stdClass
  */
 static function setUpColumns($columns)
 {
     $columns->resultId = Result::columns()->id;
     $columns->tagId = Tag::columns()->id;
     //$columns->resultId = Column::INTEGER + Column::NOT_NULL;
     //$columns->tagId = Column::INTEGER + Column::NOT_NULL;
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 /**
  * 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;
 }