deleteCategory() 공개 메소드

Delete a category and move all related content
public deleteCategory ( integer $categoryID, integer $moveChildrenTo ) : boolean
$categoryID integer
$moveChildrenTo integer
리턴 boolean
예제 #1
0
파일: Blog.php 프로젝트: paragonie/airship
 /**
  * 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));
 }