public static function photobook($url, $photobook_id, $user_id = null) { if (Yii::$app->user->isGuest && $user_id == null) { return false; } if ($user_id == null) { $user_id = Yii::$app->user->identity->getId(); } //$alpha_id=AlphaId::id($user_id); $photobook_id = AlphaId::id($photobook_id); if ($url) { $base_url = UserUrl::homeS3(true, $user_id) . '/' . 'pb'; return $base_url . '/' . $photobook_id; } else { $base_path = UserUrl::home(false, $user_id); return UserUrl::createNonexistentDirInPath($base_path, 'pb' . DIRECTORY_SEPARATOR . $photobook_id); } }