CapabilitiesAndRoles
in package
Table of Contents
- DELETE_CUSTOMER = 'mphb_delete_customer'
- EDIT_CUSTOMER = 'mphb_edit_customer'
- EXPORT_REPORTS = 'mphb_export_reports'
- IMPORT_ICAL = 'mphb_import_ical'
- MANAGE_RULES = 'mphb_manage_booking_rules'
- MANAGE_SETTINGS = 'mphb_manage_settings'
- MANAGE_TAXES_AND_FEES = 'mphb_manage_taxes_and_fees'
- SYNC_ICAL = 'mphb_sync_ical'
- VIEW_CALENDAR = 'mphb_view_calendar'
- VIEW_CUSTOMERS = 'mphb_view_customers'
- VIEW_REPORTS = 'mphb_view_reports'
- $capabilities : array<string|int, mixed>
- $roles : array<string|int, mixed>
- __construct() : mixed
- getCapabilities() : array<string|int, mixed>
- getCapabilitiesByRole() : bool
- getRoles() : array<string|int, mixed>
- mapCapabilitiesToRoles() : mixed
- Maps custom capabilities to WP Roles.
- mapRolesToCapabilities() : mixed
- Maps Wp Roles to capabilities.
- setup() : mixed
Constants
DELETE_CUSTOMER
public
mixed
DELETE_CUSTOMER
= 'mphb_delete_customer'
EDIT_CUSTOMER
public
mixed
EDIT_CUSTOMER
= 'mphb_edit_customer'
EXPORT_REPORTS
public
mixed
EXPORT_REPORTS
= 'mphb_export_reports'
IMPORT_ICAL
public
mixed
IMPORT_ICAL
= 'mphb_import_ical'
MANAGE_RULES
public
mixed
MANAGE_RULES
= 'mphb_manage_booking_rules'
MANAGE_SETTINGS
public
mixed
MANAGE_SETTINGS
= 'mphb_manage_settings'
MANAGE_TAXES_AND_FEES
public
mixed
MANAGE_TAXES_AND_FEES
= 'mphb_manage_taxes_and_fees'
SYNC_ICAL
public
mixed
SYNC_ICAL
= 'mphb_sync_ical'
VIEW_CALENDAR
public
mixed
VIEW_CALENDAR
= 'mphb_view_calendar'
VIEW_CUSTOMERS
public
mixed
VIEW_CUSTOMERS
= 'mphb_view_customers'
VIEW_REPORTS
public
mixed
VIEW_REPORTS
= 'mphb_view_reports'
Properties
$capabilities
public
array<string|int, mixed>
$capabilities
$roles
public
array<string|int, mixed>
$roles
Methods
__construct()
public
__construct() : mixed
Return values
mixed —getCapabilities()
public
getCapabilities() : array<string|int, mixed>
Return values
array<string|int, mixed> —getCapabilitiesByRole()
public
getCapabilitiesByRole(string $role) : bool
Parameters
- $role : string
-
Wp Role name.
Return values
bool —getRoles()
public
getRoles() : array<string|int, mixed>
Return values
array<string|int, mixed> —mapCapabilitiesToRoles()
Maps custom capabilities to WP Roles.
public
mapCapabilitiesToRoles() : mixed
Return values
mixed —mapRolesToCapabilities()
Maps Wp Roles to capabilities.
public
mapRolesToCapabilities() : mixed
Return values
mixed —setup()
public
static setup() : mixed