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

deleteCategory() public method

Delete a category
public deleteCategory ( string $id = '' )
$id string
    public function deleteCategory(string $id = '')
    {
        $id = (int) $id;
        $post = $this->post(new DeleteCategoryFilter());
        if ($post) {
            if ($this->processDeleteCategory($id, $post)) {
                \Airship\redirect($this->airship_cabin_prefix . '/blog/category');
            }
        }
        $category = $this->blog->getCategoryInfo($id);
        $this->lens('blog/category_delete', ['active_link' => 'bridge-link-blog-category', 'category' => $category, 'categories' => $this->blog->getCategoryTree(), 'title' => \__('Edit Category "%s"', 'default', Util::noHTML($category['name']))]);
    }