Availability_Options

Stores availability options for the restaurant menu (the opening hours, etc).

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Table of Contents

$args  : array<string|int, mixed>
$opening_hours  : Opening_Hours
__construct()  : mixed
Constructor.
are_opening_hours_enabled()  : bool
get_closed_notice()  : string
get_defaults()  : array<string|int, mixed>
Get the availability default options.
get_open_notice()  : string
get_opening_hours()  : Opening_Hours
get_options()  : array<string|int, mixed>
Get the full list of availability options as an array.
is_restaurant_open()  : bool
get_settings()  : array<string|int, mixed>
Get the availability plugin settings from the database, merged with the defaults.
parse_args()  : array<string|int, mixed>
replace_tags()  : string
Replace tags in the availability notices, e.g. {open_time}

Properties

$args

protected array<string|int, mixed> $args

The supplied args to create the availability options.

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $args = [] ][, bool $load_settings = true ]) : mixed
Parameters
$args : array<string|int, mixed> = []
$load_settings : bool = true
Return values
mixed

are_opening_hours_enabled()

public are_opening_hours_enabled() : bool
Return values
bool

get_defaults()

Get the availability default options.

public static get_defaults() : array<string|int, mixed>
Return values
array<string|int, mixed>

The defaults

get_options()

Get the full list of availability options as an array.

public get_options() : array<string|int, mixed>
Return values
array<string|int, mixed>

The availability options

get_settings()

Get the availability plugin settings from the database, merged with the defaults.

protected get_settings() : array<string|int, mixed>
Tags
see
get_defaults
Return values
array<string|int, mixed>

The settings

parse_args()

private parse_args(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>
Return values
array<string|int, mixed>

replace_tags()

Replace tags in the availability notices, e.g. {open_time}

private replace_tags(string $text) : string
Parameters
$text : string

The text to replace tags in

Return values
string

The text with replacements

Search results