deleteCategory() public method

Delete a category and move all related content
public deleteCategory ( integer $categoryID, integer $moveChildrenTo ) : boolean
$categoryID integer
$moveChildrenTo integer
return boolean
Example #1
0
 /**
  * Delete a blog post category
  *
  * @param int $categoryId
  * @param array $post
  * @return bool
  */
 protected function processDeleteCategory(int $categoryId, array $post = []) : bool
 {
     if (!$this->isSuperUser()) {
         if (!$this->can('delete')) {
             return false;
         }
     }
     return $this->blog->deleteCategory($categoryId, (int) ($post['moveChildrenTo'] ?? 0));
 }