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

editCategory() public method

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