Airship\Cabin\Bridge\Landing\Blog::listTags PHP Method

listTags() public method

List tags
public listTags ( mixed $page = null )
$page mixed
    public function listTags($page = null)
    {
        list($offset, $limit) = $this->getOffsetAndLimit($page);
        list($sort, $dir) = $this->getSortArgs('name');
        $post = $this->post(new NewTagFilter());
        if (!empty($post)) {
            if ($this->blog->createTag($post)) {
                \Airship\redirect($this->airship_cabin_prefix . '/blog/tag');
            }
        }
        $this->lens('blog/tags', ['active_link' => 'bridge-link-blog-tags', 'tags' => $this->blog->listTags($offset, $limit, $sort, $dir === 'DESC'), 'sort' => $sort, 'dir' => $dir, 'pagination' => ['base' => $this->airship_cabin_prefix . '/blog/tag', 'suffix' => '/', 'extra_args' => '?sort=' . $sort . '&dir=' . $dir, 'count' => $this->blog->numTags(), 'page' => (int) \ceil($offset / ($limit ?? 1)) + 1, 'per_page' => $limit]]);
    }