EasyBlogModelCategory
extends EasyBlogAdminModel
in package
Table of Contents
Properties
- $searchables : mixed
- $total : mixed
Methods
- __construct() : mixed
- _getParentIdsWithPost() : mixed
- Retrieves a list of parent categories with posts
- addCategorySubscription() : mixed
- Adding user into category subscription
- aliasExists() : mixed
- Determines if an alias exists on the site
- allowAclCategory() : mixed
- Check if current logged in user group allow in category ACL.
- deleteExistingFieldMapping() : mixed
- Delete existing group custom field mapping with the category id
- duplicateAcl() : mixed
- Duplicates acl items for a category
- duplicateFieldGroups() : mixed
- Duplicates custom field groups for a category
- generateCategoryFilterList() : mixed
- Return categories hierachy and sort by ordering column.
- getActiveAuthors() : mixed
- Retrieves a list of active authors for a category
- getActiveAuthorsCount() : mixed
- Retrieves the count of active authors for a category
- getAllCategories() : mixed
- Returns all categories
- getCategories() : mixed
- Retrieves a list of categories
- getCategories_old() : mixed
- Retrieves a list of categories
- getCategorySubscribers() : mixed
- Return category subscribers
- getChildCategories() : mixed
- Retrieves a list of categories from a specific parent category
- getChildCount() : mixed
- Returns the number of childs for a parent category
- getChildParentCategories() : mixed
- Retrieves all the child parent categories
- getData() : mixed
- Retrieves categories from the back end
- getDefaultCategory() : mixed
- Retrieves the default category from the site
- getDefaultCategoryId() : mixed
- Retrieves the id of the default category
- getPagination() : mixed
- Retrieves the pagination used at the back end
- getParentCategories() : mixed
- Retrieves a list of parent categories on the site
- getParentCategoriesWithPost() : mixed
- Retrieves a list of parent categories with posts
- getPosts() : mixed
- Retrieve a list of blog posts from a specific list of categories
- getSearchableItems() : mixed
- Get searchable columns
- getTeamBlogCount() : mixed
- Return teamblog count that uses a category
- getTotalCategory() : int
- Method to get total category created so far iregardless the status.
- getTotalPostCount() : mixed
- Retrieve the total number of posts in a category
- getUsedCount() : mixed
- Returns the number of blog entries created within this category.
- getUserStateFromRequest() : mixed
- Gets the value of a user state variable.
- isCategorySubscribedEmail() : mixed
- Check if user subscribed to category based on email
- isCategorySubscribedUser() : mixed
- Check if user subscribed to category
- isExist() : mixed
- Determine if the category exists on the site.
- preloadByPosts() : mixed
- Preload categories used by posts
- publish() : mixed
- Method to publish or unpublish categories
- resetDefault() : mixed
- Ensure that there are no other categories that are default.
- updateCategorySubscriptionEmail() : mixed
- Update user into category subscription based on email
- bindTable() : mixed
- implodeValues() : mixed
- populateState() : void
- Populate current stats
Properties
$searchables
public
mixed
$searchables
= array()
$total
public
mixed
$total
= \null
Methods
__construct()
public
__construct() : mixed
_getParentIdsWithPost()
Retrieves a list of parent categories with posts
public
_getParentIdsWithPost([mixed $accessibleCatsIds = array() ]) : mixed
Parameters
- $accessibleCatsIds : mixed = array()
Tags
addCategorySubscription()
Adding user into category subscription
public
addCategorySubscription(mixed $categoryId, mixed $email[, mixed $userId = '0' ][, mixed $fullname = '' ]) : mixed
Parameters
- $categoryId : mixed
- $email : mixed
- $userId : mixed = '0'
- $fullname : mixed = ''
Tags
aliasExists()
Determines if an alias exists on the site
public
aliasExists(mixed $alias[, mixed $excludeId = '' ]) : mixed
Parameters
- $alias : mixed
- $excludeId : mixed = ''
Tags
allowAclCategory()
Check if current logged in user group allow in category ACL.
public
allowAclCategory([mixed $catId = 0 ]) : mixed
Parameters
- $catId : mixed = 0
Tags
deleteExistingFieldMapping()
Delete existing group custom field mapping with the category id
public
deleteExistingFieldMapping(mixed $categoryId) : mixed
Parameters
- $categoryId : mixed
Tags
duplicateAcl()
Duplicates acl items for a category
public
duplicateAcl(EasyBlogTableCategory $originalCategory, EasyBlogTableCategory $newCategory) : mixed
Parameters
- $originalCategory : EasyBlogTableCategory
- $newCategory : EasyBlogTableCategory
Tags
duplicateFieldGroups()
Duplicates custom field groups for a category
public
duplicateFieldGroups(EasyBlogTableCategory $originalCategory, EasyBlogTableCategory $newCategory) : mixed
Parameters
- $originalCategory : EasyBlogTableCategory
- $newCategory : EasyBlogTableCategory
Tags
generateCategoryFilterList()
Return categories hierachy and sort by ordering column.
public
generateCategoryFilterList() : mixed
Tags
getActiveAuthors()
Retrieves a list of active authors for a category
public
getActiveAuthors(mixed $categoryId) : mixed
Parameters
- $categoryId : mixed
Tags
getActiveAuthorsCount()
Retrieves the count of active authors for a category
public
getActiveAuthorsCount(mixed $categoryId) : mixed
Parameters
- $categoryId : mixed
Tags
getAllCategories()
Returns all categories
public
getAllCategories([mixed $parentOnly = false ]) : mixed
Parameters
- $parentOnly : mixed = false
Tags
getCategories()
Retrieves a list of categories
public
getCategories([mixed $sort = 'latest' ][, mixed $hideEmptyPost = true ][, mixed $limit = 0 ][, mixed $inclusion = array() ][, mixed $pagination = true ]) : mixed
Parameters
- $sort : mixed = 'latest'
- $hideEmptyPost : mixed = true
- $limit : mixed = 0
- $inclusion : mixed = array()
- $pagination : mixed = true
Tags
getCategories_old()
Retrieves a list of categories
public
getCategories_old([mixed $sort = 'latest' ][, mixed $hideEmptyPost = true ][, mixed $limit = 0 ][, mixed $inclusion = array() ][, mixed $pagination = true ]) : mixed
Parameters
- $sort : mixed = 'latest'
- $hideEmptyPost : mixed = true
- $limit : mixed = 0
- $inclusion : mixed = array()
- $pagination : mixed = true
Tags
getCategorySubscribers()
Return category subscribers
public
getCategorySubscribers(mixed $categoryId) : mixed
Parameters
- $categoryId : mixed
Tags
getChildCategories()
Retrieves a list of categories from a specific parent category
public
getChildCategories(mixed $parentId[, mixed $isPublishedOnly = false ][, mixed $isFrontendWrite = false ][, mixed $exclusion = array() ]) : mixed
Parameters
- $parentId : mixed
- $isPublishedOnly : mixed = false
- $isFrontendWrite : mixed = false
- $exclusion : mixed = array()
Tags
getChildCount()
Returns the number of childs for a parent category
public
getChildCount(mixed $categoryId[, mixed $published = false ]) : mixed
Parameters
- $categoryId : mixed
- $published : mixed = false
Tags
getChildParentCategories()
Retrieves all the child parent categories
public
getChildParentCategories(mixed $parentId[, mixed $categories = [] ]) : mixed
Parameters
- $parentId : mixed
- $categories : mixed = []
Tags
getData()
Retrieves categories from the back end
public
getData() : mixed
Tags
getDefaultCategory()
Retrieves the default category from the site
public
getDefaultCategory() : mixed
Tags
getDefaultCategoryId()
Retrieves the id of the default category
public
getDefaultCategoryId() : mixed
Tags
getPagination()
Retrieves the pagination used at the back end
public
getPagination() : mixed
Tags
getParentCategories()
Retrieves a list of parent categories on the site
public
getParentCategories(mixed $contentId[, mixed $type = 'all' ][, mixed $isPublishedOnly = false ][, mixed $isFrontendWrite = false ][, mixed $exclusion = array() ][, mixed $debug = false ]) : mixed
Parameters
- $contentId : mixed
- $type : mixed = 'all'
- $isPublishedOnly : mixed = false
- $isFrontendWrite : mixed = false
- $exclusion : mixed = array()
- $debug : mixed = false
Tags
getParentCategoriesWithPost()
Retrieves a list of parent categories with posts
public
getParentCategoriesWithPost([mixed $accessible = array() ]) : mixed
Parameters
- $accessible : mixed = array()
Tags
getPosts()
Retrieve a list of blog posts from a specific list of categories
public
getPosts(mixed $categories[, mixed $limit = null ][, mixed $includeAuthors = array() ][, mixed $excludeAuthors = array() ][, mixed $options = array() ]) : mixed
Parameters
- $categories : mixed
- $limit : mixed = null
- $includeAuthors : mixed = array()
- $excludeAuthors : mixed = array()
- $options : mixed = array()
Tags
getSearchableItems()
Get searchable columns
public
getSearchableItems(mixed $query) : mixed
Parameters
- $query : mixed
Tags
getTeamBlogCount()
Return teamblog count that uses a category
public
getTeamBlogCount(mixed $catId) : mixed
Parameters
- $catId : mixed
Tags
getTotalCategory()
Method to get total category created so far iregardless the status.
public
getTotalCategory([mixed $userId = 0 ]) : int
Parameters
- $userId : mixed = 0
Tags
Return values
intgetTotalPostCount()
Retrieve the total number of posts in a category
public
getTotalPostCount(mixed $ids[, mixed $options = array() ]) : mixed
Parameters
- $ids : mixed
- $options : mixed = array()
Tags
getUsedCount()
Returns the number of blog entries created within this category.
public
getUsedCount(mixed $categoryId[, mixed $published = false ]) : mixed
Parameters
- $categoryId : mixed
- $published : mixed = false
Tags
getUserStateFromRequest()
Gets the value of a user state variable.
public
getUserStateFromRequest(mixed $key, mixed $request[, mixed $default = null ][, mixed $type = 'none' ]) : mixed
Parameters
- $key : mixed
- $request : mixed
- $default : mixed = null
- $type : mixed = 'none'
isCategorySubscribedEmail()
Check if user subscribed to category based on email
public
isCategorySubscribedEmail(mixed $categoryId, mixed $email) : mixed
Parameters
- $categoryId : mixed
- $email : mixed
Tags
isCategorySubscribedUser()
Check if user subscribed to category
public
isCategorySubscribedUser(mixed $categoryId, mixed $userId, mixed $email) : mixed
Parameters
- $categoryId : mixed
- $userId : mixed
- $email : mixed
Tags
isExist()
Determine if the category exists on the site.
public
isExist(mixed $categoryName[, mixed $excludeCatIds = '0' ]) : mixed
Parameters
- $categoryName : mixed
- $excludeCatIds : mixed = '0'
Tags
preloadByPosts()
Preload categories used by posts
public
preloadByPosts(array<string|int, mixed> $postIds[, mixed $options = array() ]) : mixed
Parameters
- $postIds : array<string|int, mixed>
- $options : mixed = array()
Tags
publish()
Method to publish or unpublish categories
public
publish([mixed &$categories = array() ][, mixed $publish = 1 ]) : mixed
Parameters
- $categories : mixed = array()
- $publish : mixed = 1
Tags
resetDefault()
Ensure that there are no other categories that are default.
public
resetDefault() : mixed
Tags
updateCategorySubscriptionEmail()
Update user into category subscription based on email
public
updateCategorySubscriptionEmail(mixed $sid, mixed $userid, mixed $email) : mixed
Parameters
- $sid : mixed
- $userid : mixed
- $email : mixed
Tags
bindTable()
protected
bindTable(mixed $tableName, mixed $result) : mixed
Parameters
- $tableName : mixed
- $result : mixed
implodeValues()
protected
implodeValues(mixed $data) : mixed
Parameters
- $data : mixed
populateState()
Populate current stats
protected
populateState() : void