RoomType
in package
Table of Contents
- $adults : int
- $attributes : array<string|int, mixed>
- $bedType : string
- $categories : array<string|int, WP_Term>
- $children : int
- $description : string
- $excerpt : string
- $facilities : array<string|int, WP_Term>
- $galleryIds : array<string|int, int>
- $id : int
- $imageId : int
- $originalId : int
- $servicesIds : array<string|int, int>
- $size : float
- $status : string
- $tags : array<string|int, WP_Term>
- $title : string
- $totalCapacity : int|string
- $view : string
- __construct() : mixed
- calcTotalCapacity() : int
- getAdultsCapacity() : int
- getAttributes() : array<string|int, mixed>
- getBedType() : string
- getCategories() : array<string|int, WP_Term>
- Retrieve room type categories terms objects
- getChildrenCapacity() : int
- getDatesHavePrice() : array<string|int, mixed>
- getDefaultPrice() : float
- Retrieve minimal average price from today to +X (from settings) days.
- getDefaultPriceForDates() : float
- Retrieve minimal price for dates
- getDescription() : string
- getExcerpt() : string
- getFacilities() : array<string|int, WP_Term>
- getFeaturedImageId() : string
- Retrieve room type featured image id.
- getGalleryIds() : array<string|int, mixed>
- Retrieve ids of gallery's attachments
- getId() : int
- getLink() : mixed
- getOriginalId() : int
- getServices() : array<string|int, int>
- Retrieve services available for this room type
- getServicesPriceList() : array<string|int, mixed>
- getSize() : string
- getStatus() : string
- getTags() : array<string|int, WP_Term>
- Retrieve room type tags terms objects
- getTaxesAndFees() : TaxesAndFees
- getTitle() : string
- getTotalCapacity() : int|string
- getView() : string
- hasFeaturedImage() : bool
- Check is room type has featured image
- hasGallery() : bool
- Check is room type has gallery
- hasLimitedTotalCapacity() : bool
- hasServices() : bool
- hasTaxesAndFees() : bool
Properties
$adults
private
int
$adults
$attributes
private
array<string|int, mixed>
$attributes
Tags
$bedType
private
string
$bedType
$categories
private
array<string|int, WP_Term>
$categories
$children
private
int
$children
$description
private
string
$description
$excerpt
private
string
$excerpt
$facilities
private
array<string|int, WP_Term>
$facilities
$galleryIds
private
array<string|int, int>
$galleryIds
$id
private
int
$id
$imageId
private
int
$imageId
$originalId
private
int
$originalId
$servicesIds
private
array<string|int, int>
$servicesIds
$size
private
float
$size
$status
private
string
$status
$tags
private
array<string|int, WP_Term>
$tags
$title
private
string
$title
$totalCapacity
private
int|string
$totalCapacity
Tags
$view
private
string
$view
Methods
__construct()
public
__construct(array<string|int, mixed> $atts) : mixed
Parameters
- $atts : array<string|int, mixed>
Return values
mixed —calcTotalCapacity()
public
calcTotalCapacity() : int
Tags
Return values
int —getAdultsCapacity()
public
getAdultsCapacity() : int
Return values
int —getAttributes()
public
getAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed> —[%Attribute name% => [%Term ID% => %Term title%]]
getBedType()
public
getBedType() : string
Return values
string —getCategories()
Retrieve room type categories terms objects
public
getCategories() : array<string|int, WP_Term>
Return values
array<string|int, WP_Term> —getChildrenCapacity()
public
getChildrenCapacity() : int
Return values
int —getDatesHavePrice()
public
getDatesHavePrice() : array<string|int, mixed>
Return values
array<string|int, mixed> —with dates (string in format Y-m-d) which have rate
getDefaultPrice()
Retrieve minimal average price from today to +X (from settings) days.
public
getDefaultPrice() : float
Tags
Return values
float —getDefaultPriceForDates()
Retrieve minimal price for dates
public
getDefaultPriceForDates(DateTime $checkInDate, DateTime $checkOutDate) : float
Parameters
- $checkInDate : DateTime
- $checkOutDate : DateTime
Tags
Return values
float —getDescription()
public
getDescription() : string
Return values
string —getExcerpt()
public
getExcerpt() : string
Return values
string —getFacilities()
public
getFacilities() : array<string|int, WP_Term>
Return values
array<string|int, WP_Term> —getFeaturedImageId()
Retrieve room type featured image id.
public
getFeaturedImageId() : string
Return values
string —| int Room type featured image ID or empty string.
getGalleryIds()
Retrieve ids of gallery's attachments
public
getGalleryIds() : array<string|int, mixed>
Return values
array<string|int, mixed> —getId()
public
getId() : int
Return values
int —getLink()
public
getLink() : mixed
Return values
mixed —getOriginalId()
public
getOriginalId() : int
Return values
int —getServices()
Retrieve services available for this room type
public
getServices() : array<string|int, int>
Return values
array<string|int, int> —getServicesPriceList()
public
getServicesPriceList() : array<string|int, mixed>
Return values
array<string|int, mixed> —getSize()
public
getSize([bool $withUnits = false ]) : string
Parameters
- $withUnits : bool = false
-
Optional. Whether to append units to size. Default FALSE.
Return values
string —getStatus()
public
getStatus() : string
Return values
string —getTags()
Retrieve room type tags terms objects
public
getTags() : array<string|int, WP_Term>
Return values
array<string|int, WP_Term> —getTaxesAndFees()
public
getTaxesAndFees() : TaxesAndFees
Tags
Return values
TaxesAndFees —object.
getTitle()
public
getTitle() : string
Return values
string —getTotalCapacity()
public
getTotalCapacity() : int|string
Tags
Return values
int|string —getView()
public
getView() : string
Return values
string —hasFeaturedImage()
Check is room type has featured image
public
hasFeaturedImage() : bool
Return values
bool —hasGallery()
Check is room type has gallery
public
hasGallery() : bool
Return values
bool —hasLimitedTotalCapacity()
public
hasLimitedTotalCapacity() : bool
Tags
Return values
bool —hasServices()
public
hasServices() : bool
Return values
bool —hasTaxesAndFees()
public
hasTaxesAndFees() : bool