AbstractBookingPage
extends AbstractShortcodeCompatiblePage
in package
Tags
Table of Contents
- POST_ID = -99
- Negative ID to avoid clash with a valid post
- __construct() : mixed
- addPageClasses() : array<string|int, string>
- addPageToPageList() : mixed
- defineShortcodesEntity() : mixed
- displayPostStates() : mixed
- getActionURL() : string
- initAction() : mixed
- togglePageStatus() : mixed
- action() : void
- createPage() : WP_Post
- createWpPost() : mixed
- defaultContent() : string
- generateToken() : mixed
- getActionName() : string
- getCompatibleShortcodes() : array<string|int, AbstractDirectLinkEntityShortcode>
- getEntity() : AbstractEntity|null
- getEntityRepository() : BookingRepository
- getPage() : WP_Post|null
- getPageId() : int
- getPageSlug() : string
- getTitle() : string
- isCurrentActionRequest() : bool
- isValidToken() : mixed
- mustContent() : string
- optionNameWithPageId() : string
- render() : mixed
- hasMustContent() : mixed
- preventDbCalls() : void
- Caching our page to prevent any (error-producing) calls to the database
- updateMainWpQuery() : void
- Adding our page to the main wp_query
Constants
POST_ID
Negative ID to avoid clash with a valid post
public
mixed
POST_ID
= -99
Methods
__construct()
public
__construct() : mixed
Return values
mixed —addPageClasses()
public
addPageClasses( $classes) : array<string|int, string>
Parameters
Return values
array<string|int, string> —addPageToPageList()
public
addPageToPageList(mixed $pages, mixed $parsed_args) : mixed
Parameters
- $pages : mixed
- $parsed_args : mixed
Return values
mixed —defineShortcodesEntity()
public
defineShortcodesEntity() : mixed
Return values
mixed —displayPostStates()
public
displayPostStates(mixed $postStates, mixed $post) : mixed
Parameters
- $postStates : mixed
- $post : mixed
Return values
mixed —getActionURL()
public
getActionURL(InterfaceUniqueEntity $uniqueEntity) : string
Parameters
- $uniqueEntity : InterfaceUniqueEntity
Return values
string —initAction()
public
initAction() : mixed
Return values
mixed —togglePageStatus()
public
togglePageStatus(mixed $oldValue, mixed $value) : mixed
Parameters
- $oldValue : mixed
- $value : mixed
Return values
mixed —action()
protected
abstract action(InterfaceUniqueEntity $entity) : void
Parameters
- $entity : InterfaceUniqueEntity
Return values
void —createPage()
protected
createPage() : WP_Post
Return values
WP_Post —createWpPost()
protected
final createWpPost(mixed $title, mixed $content) : mixed
Parameters
- $title : mixed
- $content : mixed
Return values
mixed —defaultContent()
protected
abstract defaultContent() : string
Return values
string —generateToken()
protected
generateToken(mixed $id, mixed $uid) : mixed
Parameters
- $id : mixed
- $uid : mixed
Return values
mixed —getActionName()
protected
abstract getActionName() : string
Return values
string —getCompatibleShortcodes()
protected
getCompatibleShortcodes() : array<string|int, AbstractDirectLinkEntityShortcode>
Return values
array<string|int, AbstractDirectLinkEntityShortcode> —getEntity()
protected
getEntity() : AbstractEntity|null
Return values
AbstractEntity|null —getEntityRepository()
protected
getEntityRepository() : BookingRepository
Return values
BookingRepository —getPage()
protected
getPage() : WP_Post|null
Return values
WP_Post|null —getPageId()
protected
abstract getPageId() : int
Return values
int —getPageSlug()
protected
abstract getPageSlug() : string
Return values
string —getTitle()
protected
abstract getTitle() : string
Return values
string —isCurrentActionRequest()
protected
isCurrentActionRequest() : bool
Return values
bool —isValidToken()
protected
isValidToken() : mixed
Return values
mixed —mustContent()
protected
mustContent() : string
Return values
string —optionNameWithPageId()
protected
abstract optionNameWithPageId() : string
Return values
string —render()
protected
final render(mixed $wpPost) : mixed
Parameters
- $wpPost : mixed
Return values
mixed —hasMustContent()
private
hasMustContent(mixed $content) : mixed
Parameters
- $content : mixed
Return values
mixed —preventDbCalls()
Caching our page to prevent any (error-producing) calls to the database
private
preventDbCalls(WP_Post $wpPost) : void
Parameters
- $wpPost : WP_Post
Return values
void —updateMainWpQuery()
Adding our page to the main wp_query
private
updateMainWpQuery(WP_Post $wp_post) : void
Parameters
- $wp_post : WP_Post