EasyBlogModelRevisions
extends EasyBlogAdminModel
in package
Table of Contents
Properties
- $searchables : mixed
- $total : mixed
Methods
- __construct() : mixed
- _buildQuery() : string
- Method to build the query for the tags
- _buildQueryOrderBy() : mixed
- _buildQueryWhere() : mixed
- Builds the where clause for drafts
- cleanUp() : bool
- Method to clean up revisiosn records based on the history revision limit settings.
- deleteRevisions() : mixed
- Deletes a list of revisions from a specific post
- discard() : mixed
- getAllRevisions() : mixed
- Retrieves all available revisions for specific post
- getData() : array<string|int, mixed>
- Method to get categories item data
- getItems() : mixed
- Retrieves a list of draft posts
- getItemsPagination() : mixed
- Retrieves the pagination for administration
- getItemsTotal() : int
- Method to return the total number of rows
- getLatestDraftRevision() : mixed
- To retrieve latest draft revision id for a blog if there is any.
- getNextOrder() : mixed
- Retrieves the next ordering for the revision
- getPagination() : int
- Method to get a pagination object for the categories
- getRevisionCount() : array<string|int, mixed>
- Method to get count for a revision type for a blog post
- getRevisions() : array<string|int, mixed>
- Method to get revisions item data
- getSearchableItems() : mixed
- Get searchable columns
- getTotal() : mixed
- methods used in frontend
- getUserStateFromRequest() : mixed
- Gets the value of a user state variable.
- isWaitingApproval() : mixed
- Retrieves all available revisions with pending state.
- preload() : array<string|int, mixed>
- Method to pre-load posts revisions.
- removeDraftRevisions() : mixed
- Delete all draft revision of a blog post
- bindTable() : mixed
- implodeValues() : mixed
- populateState() : void
- Populate current stats
- buildItemsQuery() : mixed
- buildItemsQueryWhere() : mixed
- cleanUpToLatest() : bool
- Method to clean up revisiosn records based on the history revision limit settings.
- cleanUpToLimit() : bool
- Method to clean up revisiosn records based on the history revision limit settings.
Properties
$searchables
public
mixed
$searchables
= array('id')
$total
private
mixed
$total
= \null
Methods
__construct()
public
__construct() : mixed
_buildQuery()
Method to build the query for the tags
public
_buildQuery() : string
Tags
Return values
string_buildQueryOrderBy()
public
_buildQueryOrderBy() : mixed
_buildQueryWhere()
Builds the where clause for drafts
public
_buildQueryWhere() : mixed
Tags
cleanUp()
Method to clean up revisiosn records based on the history revision limit settings.
public
cleanUp(mixed $postId, mixed $latestRevId[, mixed $options = array() ]) : bool
Parameters
- $postId : mixed
- $latestRevId : mixed
- $options : mixed = array()
Tags
Return values
booldeleteRevisions()
Deletes a list of revisions from a specific post
public
deleteRevisions(mixed $postId) : mixed
Parameters
- $postId : mixed
Tags
discard()
public
discard(mixed $userId) : mixed
Parameters
- $userId : mixed
getAllRevisions()
Retrieves all available revisions for specific post
public
getAllRevisions(mixed $postId[, mixed $ordering = 'asc' ]) : mixed
Parameters
- $postId : mixed
- $ordering : mixed = 'asc'
Tags
getData()
Method to get categories item data
public
getData([mixed $usePagination = true ]) : array<string|int, mixed>
Parameters
- $usePagination : mixed = true
Tags
Return values
array<string|int, mixed>getItems()
Retrieves a list of draft posts
public
getItems() : mixed
Tags
getItemsPagination()
Retrieves the pagination for administration
public
getItemsPagination() : mixed
Tags
getItemsTotal()
Method to return the total number of rows
public
getItemsTotal() : int
Tags
Return values
intgetLatestDraftRevision()
To retrieve latest draft revision id for a blog if there is any.
public
getLatestDraftRevision(mixed $postId) : mixed
Parameters
- $postId : mixed
Tags
getNextOrder()
Retrieves the next ordering for the revision
public
getNextOrder(mixed $postId) : mixed
Parameters
- $postId : mixed
Tags
getPagination()
Method to get a pagination object for the categories
public
getPagination() : int
Tags
Return values
intgetRevisionCount()
Method to get count for a revision type for a blog post
public
getRevisionCount(mixed $postId, mixed $type) : array<string|int, mixed>
Parameters
- $postId : mixed
- $type : mixed
Tags
Return values
array<string|int, mixed>getRevisions()
Method to get revisions item data
public
getRevisions([mixed $options = array() ]) : array<string|int, mixed>
Parameters
- $options : mixed = array()
Tags
Return values
array<string|int, mixed>getSearchableItems()
Get searchable columns
public
getSearchableItems(mixed $query) : mixed
Parameters
- $query : mixed
Tags
getTotal()
methods used in frontend
public
getTotal() : mixed
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'
isWaitingApproval()
Retrieves all available revisions with pending state.
public
isWaitingApproval(mixed $postId) : mixed
Parameters
- $postId : mixed
Tags
preload()
Method to pre-load posts revisions.
public
preload(array<string|int, mixed> $revIds) : array<string|int, mixed>
Parameters
- $revIds : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>removeDraftRevisions()
Delete all draft revision of a blog post
public
removeDraftRevisions(mixed $postId) : mixed
Parameters
- $postId : 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
Tags
buildItemsQuery()
private
buildItemsQuery() : mixed
buildItemsQueryWhere()
private
buildItemsQueryWhere() : mixed
cleanUpToLatest()
Method to clean up revisiosn records based on the history revision limit settings.
private
cleanUpToLatest(mixed $postId, mixed $latestRevId) : bool
Parameters
- $postId : mixed
- $latestRevId : mixed
Tags
Return values
boolcleanUpToLimit()
Method to clean up revisiosn records based on the history revision limit settings.
private
cleanUpToLimit(mixed $postId, mixed $latestRevId, mixed $max) : bool
Parameters
- $postId : mixed
- $latestRevId : mixed
- $max : mixed