Airship\Cabin\Hull\Landing\BlogPosts::listBySeries PHP Method

listBySeries() public method

List all of the blog posts for a given year
public listBySeries ( string $slug = '', string $page = '' )
$slug string
$page string
    public function listBySeries(string $slug = '', string $page = '')
    {
        list($offset, $limit) = $this->getOffsetAndLimit($page);
        $series = $this->blog->getSeriesInfo($slug);
        $count = $this->blog->countBySeries((int) $series['seriesid']);
        $series_items = $this->blog->listBySeries((int) $series['seriesid'], $limit, $offset);
        $args = ['series' => $series, 'pageTitle' => $series['name'], 'series_items' => $series_items, 'pagination' => ['base' => \Airship\LensFunctions\cabin_url() . 'blog/series/' . $slug, 'count' => $count, 'page' => (int) \ceil($offset / ($limit ?? 1)) + 1, 'per_page' => $limit]];
        $this->config('blog.cachelists') ? $this->stasis('blog/series', $args) : $this->lens('blog/series', $args);
    }