GetRoomTypeCalendarData
extends AbstractAjaxApiAction
in package
Any action must not contain any business logic! It just validate request data, directs validated request to the Core API, gets result and send response.
Table of Contents
- AJAX_ACTION_NAME_PREFIX = 'mphb_'
- MAX_REQUEST_DATES_INTERVAL_IN_DAYS = 366
- REQUEST_DATA_END_DATE = 'end_date'
- REQUEST_DATA_IS_SHOW_PRICES = 'is_show_prices'
- REQUEST_DATA_IS_SHOW_PRICES_CURRENCY = 'is_show_prices_currency'
- REQUEST_DATA_IS_TRUNCATE_PRICES = 'is_truncate_prices'
- REQUEST_DATA_LOCALE = 'mphb_locale'
- REQUEST_DATA_ROOM_TYPE_ID = 'room_type_id'
- REQUEST_DATA_START_DATE = 'start_date'
- REQUEST_DATA_WP_NONCE = 'mphb_nonce'
- getAjaxActionName() : mixed
- getAjaxActionNameWithouPrefix() : mixed
- isActionForGuestUser() : mixed
- isActionForLoggedInUser() : mixed
- processAjaxRequest() : mixed
- doAction() : mixed
- getBooleanFromRequest() : mixed
- getDateFromRequest() : DateTime
- Date must be in string Y-m-d fromat
- getIntegerFromRequest() : mixed
- getStringFromRequest() : mixed
- getValidatedRequestData() : mixed
Constants
AJAX_ACTION_NAME_PREFIX
public
mixed
AJAX_ACTION_NAME_PREFIX
= 'mphb_'
MAX_REQUEST_DATES_INTERVAL_IN_DAYS
public
mixed
MAX_REQUEST_DATES_INTERVAL_IN_DAYS
= 366
REQUEST_DATA_END_DATE
public
mixed
REQUEST_DATA_END_DATE
= 'end_date'
REQUEST_DATA_IS_SHOW_PRICES
public
mixed
REQUEST_DATA_IS_SHOW_PRICES
= 'is_show_prices'
REQUEST_DATA_IS_SHOW_PRICES_CURRENCY
public
mixed
REQUEST_DATA_IS_SHOW_PRICES_CURRENCY
= 'is_show_prices_currency'
REQUEST_DATA_IS_TRUNCATE_PRICES
public
mixed
REQUEST_DATA_IS_TRUNCATE_PRICES
= 'is_truncate_prices'
REQUEST_DATA_LOCALE
public
mixed
REQUEST_DATA_LOCALE
= 'mphb_locale'
REQUEST_DATA_ROOM_TYPE_ID
public
mixed
REQUEST_DATA_ROOM_TYPE_ID
= 'room_type_id'
REQUEST_DATA_START_DATE
public
mixed
REQUEST_DATA_START_DATE
= 'start_date'
REQUEST_DATA_WP_NONCE
public
mixed
REQUEST_DATA_WP_NONCE
= 'mphb_nonce'
Methods
getAjaxActionName()
public
final static getAjaxActionName() : mixed
Return values
mixed —getAjaxActionNameWithouPrefix()
public
static getAjaxActionNameWithouPrefix() : mixed
Return values
mixed —isActionForGuestUser()
public
static isActionForGuestUser() : mixed
Return values
mixed —isActionForLoggedInUser()
public
static isActionForLoggedInUser() : mixed
Return values
mixed —processAjaxRequest()
public
final static processAjaxRequest() : mixed
Return values
mixed —doAction()
protected
static doAction(array<string|int, mixed> $requestData) : mixed
Parameters
- $requestData : array<string|int, mixed>
Return values
mixed —getBooleanFromRequest()
protected
static getBooleanFromRequest(string $requestDataName[, bool $isRequired = false ][, bool $defaultValue = false ]) : mixed
Parameters
- $requestDataName : string
- $isRequired : bool = false
- $defaultValue : bool = false
Return values
mixed —getDateFromRequest()
Date must be in string Y-m-d fromat
protected
static getDateFromRequest(string $requestDataName[, bool $isRequired = false ][, mixed $defaultValue = null ]) : DateTime
Parameters
- $requestDataName : string
- $isRequired : bool = false
- $defaultValue : mixed = null
Tags
Return values
DateTime —or null
getIntegerFromRequest()
protected
static getIntegerFromRequest(string $requestDataName[, bool $isRequired = false ], int $defaultValue) : mixed
Parameters
- $requestDataName : string
- $isRequired : bool = false
- $defaultValue : int
Return values
mixed —getStringFromRequest()
protected
static getStringFromRequest(string $requestDataName[, bool $isRequired = false ][, string $defaultValue = '' ]) : mixed
Parameters
- $requestDataName : string
- $isRequired : bool = false
- $defaultValue : string = ''
Return values
mixed —getValidatedRequestData()
protected
static getValidatedRequestData() : mixed