View/Helper/GalleryHelper.php
private function getAlbum($model = null, $model_id = null, $album_id = null)
    {
        $Album = new Album();

        if ($album_id) {
            return $Album->findById($album_id);
        } else if ($model && $model_id) {
            return $Album->getAttachedAlbum($model, $model_id);
        }
    }
private function getAlbum($model = null, $model_id = null, $album_id = null)
    {
        $Album = new Album();

        if ($album_id) {
            return $Album->findById($album_id);
        } else if ($model && $model_id) {
            return $Album->getAttachedAlbum($model, $model_id);
        }
    }
Get an album from $model & $model_id or $album_id

@param null $model
@param null $model_id
@param null $album_id