public function actionList($album_id)
 {
     /* Czy mam prawo do albumu */
     $album = \app\modules\photo\models\Albums::findOne($album_id);
     if (!$album || !$album->canEdit()) {
         throw new \app\components\exceptions\FormException('Nie możesz edytować zdjęć tego albumu.', 403);
     }
     $dataProvider = $album->searchListOfPhotos();
     return $this->render('list', ['dataProvider' => $dataProvider, 'album' => $album, 'title' => 'Zdjęcia']);
 }
 /**
  * Lista albumów zalogowanego użytkownika
  */
 public function actionMylist()
 {
     $dataProvider = \app\modules\photo\models\Albums::searchMyAlbums();
     return $this->render('list', ['dataProvider' => $dataProvider, 'title' => 'Lista moich albumów']);
 }
 public function actionIndex()
 {
     $albums = \app\modules\photo\models\Albums::find()->all();
     return $this->render('index', ['albums' => $albums]);
 }