public function hasCategory()
    {
        $postType = getPostType($this->getTable());
        return ($postType->hasCategories && isset($this->categories) && !$this->categories->isEmpty());
    }
public function hasCategory()
    {
        $postType = getPostType($this->getTable());
        return ($postType->hasCategories && isset($this->categories) && !$this->categories->isEmpty());
    }
public function hasCategory ( ) { $ postType = getPostType ( $ this -> getTable ( ) ) ; return ( $ postType -> hasCategories && isset ( $ this -> categories ) && ! $ this -> categories -> isEmpty ( ) ) ; }
Check if a post has a primary category.

@return bool
Check if a post has a primary category .