Ejemplo n.º 1
0
 private function getAlbum()
 {
     $dir_path = \Yii::$app->params['upload']['pic3'];
     $album_list = [];
     if ($handle = opendir($dir_path)) {
         while (false !== ($entry = readdir($handle))) {
             if (in_array($entry, $this->ignore)) {
                 continue;
             }
             $album_list[$entry] = ["name" => $entry, 'switch' => \Yii::$app->params['switch']['cdn']['pic3'] ? 1 : 0, "cover_src_url" => GlobalUrlService::buildPicStaticUrl("pic3", "/{$entry}/1.jpg"), "info_url" => UrlService::buildWapUrl("/gallery/list", ['album' => $entry])];
         }
         closedir($handle);
     }
     return $album_list;
 }