Beispiel #1
0
 public function run()
 {
     $view = $view = $this->getView();
     $tag = $this->getTag();
     AttacheableAsset::register($this->getView());
     if (!$this->model->id) {
         return false;
     }
     $query = Photo::find()->where(['model' => $tag, 'parent_id' => $this->model->id]);
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     return $this->render('photolist', ['dataProvider' => $dataProvider, 'form' => new UploadForm(), 'parent_id' => $this->model->id, 'tag' => $tag, 'id' => $this->id]);
 }
Beispiel #2
0
 public function actions()
 {
     return ['delete' => ['class' => '\\s02\\photobank\\actions\\DeleteAction', 'modelClass' => Photo::className()], 'upload' => ['class' => '\\s02\\photobank\\actions\\UploadAction', 'modelClass' => Photo::className()]];
 }