Reservations
class Reservations extends AdminController
Traits
Has Authentication Trait Class
Widget Maker Trait Class
Verifies CSRF token Trait
Adds event related features to any class.
Extendable Trait Allows for "Private traits"
Properties
protected bool | $requireAuthentication | from HasAuthentication | |
protected Users_model | $currentUser | from HasAuthentication | |
protected | $validateAfterCallback | from ValidatesForm | |
array | $assetPath | from AssetMaker | |
string | $configPath | from ConfigMaker | |
protected | $configFileExtension | from ConfigMaker | |
$enableCsrfProtection | from VerifiesCsrfToken | ||
array | $vars | from ViewMaker | |
array | $viewPath | from ViewMaker | |
array | $layoutPath | from ViewMaker | |
array | $partialPath | from ViewMaker | |
string | $layout | from ViewMaker | |
bool | $suppressLayout | from ViewMaker | |
protected | $viewFileExtension | from ViewMaker | |
protected array | $emitterSingleEvents | from EventEmitter | |
protected array | $emitterEvents | from EventEmitter | |
protected array | $emitterEventSorted | from EventEmitter | |
protected array | $extensionData | from ExtendableTrait | |
static protected array | $extendableCallbacks | from ExtendableTrait | |
static protected array | $extendableStaticMethods | from ExtendableTrait | |
static protected bool | $extendableGuardProperties | from ExtendableTrait | |
static protected ClassLoader | $extendableClassLoader | from ExtendableTrait | |
$implement | |||
protected object | $fatalError | from AdminController | |
BaseWidget[] | $widgets | from AdminController | |
bool | $suppressView | from AdminController | |
protected string | $action | from AdminController | |
protected array | $params | from AdminController | |
$hiddenActions | from AdminController | ||
protected array | $publicActions | from AdminController | |
protected array | $guarded | from AdminController | |
protected | $requiredPermissions | ||
string | $pageTitle | from AdminController | |
string | $bodyClass | from AdminController | |
$listConfig | |||
$calendarConfig | |||
$formConfig |
Methods
Validate the given request with the given rules.
Validate the given request with the given rules.
No description
Get the request input based on the given validation rules.
Makes a widget object with the supplied configuration ex. model config
Makes a form widget object with the supplied form field and widget configuration.
Locates a file based on it's definition. If the file starts with a forward slash, it will be returned in context of the application public path, otherwise it will be returned in context of the asset path.
Reads the contents of the supplied file and applies it to this object.
Reads the contents of the supplied file and applies it to this object.
Merges two configuration sources, either prepared or not, and returns them as a single configuration object.
Locates a file based on it's definition. If the file starts with the ~ symbol it will be returned in context of the application base path, otherwise it will be returned in context of the config path.
Guess the package path for the called class.
Guess the package path from a specified class.
Determine if the cookie contents should be serialized.
Guess the package path from a specified class.
Render a layout.
Render a partial file contents located in the views or partial folder.
Includes a file path using output buffering.
Create a new event binding.
Create a new event binding that fires once only
Sort the listeners for a given event by priority.
Fire an event and call the listeners.
Fires a combination of local and global events. The first segment is removed from the event name locally and the local object is passed as the first argument to the event globally. Halting is also enabled by default.
Helper method for ::extend() static method
Clear the list of extended classes so they will be re-extended.
Normalizes the provided extension name allowing for the ClassLoader to inject aliased classes
Dynamically extend a class with a specified behavior
Extracts the available methods from a behavior and adds it to the list of callable methods.
Programmatically adds a method to the extendable class
Programatically adds a property to the extendable class
Check if extendable class is extended with a behavior object
Returns a behavior object from an extendable class, example:
Short hand for getClassExtension() method, except takes the short extension name, example:
Checks if a method exists, extension equivalent of method_exists()
Get a list of class methods, extension equivalent of get_class_methods()
Checks if a property exists, extension equivalent of property_exists()
Checks if a property is accessible, property equivalent of is_callabe()
Magic method for __call()
Magic method for __callStatic()
Class constructor
Returns the AJAX handler for the current request, if available.
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
in
HasAuthentication at line 23
checkUser()
No description
in
HasAuthentication at line 28
setUser($currentUser)
No description
in
HasAuthentication at line 33
getUser()
No description
in
ValidatesForm at line 29
array|bool
validatePasses($request, array $rules, array $messages = [], array $customAttributes = [])
Validate the given request with the given rules.
in
ValidatesForm at line 52
array
validate($request, array $rules, array $messages = [], array $customAttributes = [])
Validate the given request with the given rules.
in
ValidatesForm at line 64
makeValidator($request, array $rules, array $messages = [], array $customAttributes = [])
No description
in
ValidatesForm at line 80
parseRules(array $rules)
No description
in
ValidatesForm at line 93
parseAttributes(array $rules)
No description
in
ValidatesForm at line 114
protected array
extractInputFromRules(Request $request, array $rules)
Get the request input based on the given validation rules.
in
ValidatesForm at line 127
protected Factory
getValidationFactory()
Get a validation factory instance.
in
ValidatesForm at line 132
validateAfter(Closure $callback)
No description
in
ValidatesForm at line 137
protected
flashValidationErrors($errors)
No description
in
ValidatesForm at line 147
protected
validateFormWidget($form, $saveData)
No description
in
WidgetMaker at line 24
BaseWidget
makeWidget(string $class, array $widgetConfig = [])
Makes a widget object with the supplied configuration ex. model config
in
WidgetMaker at line 47
BaseFormWidget
makeFormWidget(string $class, mixed $fieldConfig = [], array $widgetConfig = [])
Makes a form widget object with the supplied form field and widget configuration.
in
AssetMaker at line 15
flushAssets()
No description
in
AssetMaker at line 30
string
getAssetPath(string $fileName, string $assetPath = null)
Locates a file based on it's definition. If the file starts with a forward slash, it will be returned in context of the application public path, otherwise it will be returned in context of the asset path.
in
AssetMaker at line 55
addMeta($meta)
No description
in
AssetMaker at line 60
addJs($href, $attributes = null)
No description
in
AssetMaker at line 65
addCss($href, $attributes = null)
No description
in
ConfigMaker at line 27
array
loadConfig(array $configFile = [], array $requiredConfig = [], null $index = null)
Reads the contents of the supplied file and applies it to this object.
in
ConfigMaker at line 46
array
makeConfig(string|array $configFile, array $requiredConfig = [])
Reads the contents of the supplied file and applies it to this object.
in
ConfigMaker at line 97
array
mergeConfig($configLeft, $configRight)
Merges two configuration sources, either prepared or not, and returns them as a single configuration object.
in
ConfigMaker at line 116
string
getConfigPath(string $fileName, mixed $configPath = null)
Locates a file based on it's definition. If the file starts with the ~ symbol it will be returned in context of the application base path, otherwise it will be returned in context of the config path.
in
ConfigMaker at line 154
string
guessConfigPath(string $suffix = '')
Guess the package path for the called class.
in
ConfigMaker at line 169
string
guessConfigPathFrom(string $class, string $suffix = '')
Guess the package path from a specified class.
in
VerifiesCsrfToken at line 20
protected
makeXsrfCookie()
No description
in
VerifiesCsrfToken at line 37
protected
verifyCsrfToken()
No description
in
VerifiesCsrfToken at line 58
protected string
getCsrfTokenFromRequest()
Get the CSRF token from the request.
in
VerifiesCsrfToken at line 79
static bool
serialized()
Determine if the cookie contents should be serialized.
in
ViewMaker at line 50
getViewPath($view, $viewPath = null)
No description
in
ViewMaker at line 78
guessViewFileExtension($path)
No description
in
ViewMaker at line 98
string
guessViewPath(string $suffix = '', bool $isPublic = false)
Guess the package path from a specified class.
in
ViewMaker at line 119
mixed
makeLayout(string $name = null, array $vars = [], bool $throwException = true)
Render a layout.
in
ViewMaker at line 147
string
makeView(string $view)
Loads a view with the name specified.
Applies layout if its name is provided by the parent object. The view file must be situated in the views directory, and has the extension "htm" or "php".
in
ViewMaker at line 171
mixed
makePartial(string $partial, array $vars = [], bool $throwException = true)
Render a partial file contents located in the views or partial folder.
in
ViewMaker at line 199
string
makeFileContent(string $filePath, array $extraParams = [])
Includes a file path using output buffering.
Ensures that vars are available.
in
ViewMaker at line 235
compileFileContent($filePath)
No description
in
ViewMaker at line 256
protected void
handleViewException(Exception $e, int $obLevel)
Handle a view exception.
in
ViewMaker at line 271
protected array
gatherViewData($data)
Get the data bound to the view instance.
in
EventEmitter at line 36
EventEmitter
bindEvent(string $event, callable $callback, int $priority = 0)
Create a new event binding.
in
EventEmitter at line 52
EventEmitter
bindEventOnce(string $event, callable $callback)
Create a new event binding that fires once only
in
EventEmitter at line 66
protected void
emitterEventSortEvents(string $eventName)
Sort the listeners for a given event by priority.
in
EventEmitter at line 84
EventEmitter
unbindEvent(string $event = null)
Destroys an event binding.
in
EventEmitter at line 124
string|array
fireEvent(string $event, array $params = [], bool $halt = false)
Fire an event and call the listeners.
in
EventEmitter at line 178
mixed
fireSystemEvent(string $event, array $params = [], bool $halt = true)
Fires a combination of local and global events. The first segment is removed from the event name locally and the local object is passed as the first argument to the event globally. Halting is also enabled by default.
For example:
$this->fireSystemEvent('admin.form.myEvent', ['my value']);
Is equivalent to:
$this->fireEvent('form.myEvent', ['myvalue'], true);
Event::fire('admin.form.myEvent', [$this, 'myvalue'], true);
in
ExtendableTrait at line 55
extendableConstruct()
Constructor.
in
ExtendableTrait at line 103
static void
extendableExtendCallback(callable $callback)
Helper method for ::extend() static method
in
ExtendableTrait at line 120
static void
clearExtendedClasses()
Clear the list of extended classes so they will be re-extended.
in
ExtendableTrait at line 131
protected string
extensionNormalizeClassName(string $name)
Normalizes the provided extension name allowing for the ClassLoader to inject aliased classes
in
ExtendableTrait at line 149
void|ExtendableTrait
extendClassWith(string $extensionName)
Dynamically extend a class with a specified behavior
in
ExtendableTrait at line 178
protected void
extensionExtractMethods(string $extensionName, object $extensionObject)
Extracts the available methods from a behavior and adds it to the list of callable methods.
in
ExtendableTrait at line 206
addDynamicMethod(string $dynamicName, callable $method, string $extension = null)
Programmatically adds a method to the extendable class
in
ExtendableTrait at line 225
addDynamicProperty(string $dynamicName, string $value = null)
Programatically adds a property to the extendable class
in
ExtendableTrait at line 249
bool
isClassExtendedWith(string $name)
Check if extendable class is extended with a behavior object
in
ExtendableTrait at line 265
mixed
getClassExtension(string $name)
Returns a behavior object from an extendable class, example:
$this->getClassExtension('Admin.Actions.FormController')
in
ExtendableTrait at line 280
mixed
asExtension(string $shortName)
Short hand for getClassExtension() method, except takes the short extension name, example:
$this->asExtension('FormController')
in
ExtendableTrait at line 301
bool
methodExists(string $name)
Checks if a method exists, extension equivalent of method_exists()
in
ExtendableTrait at line 313
array
getClassMethods()
Get a list of class methods, extension equivalent of get_class_methods()
in
ExtendableTrait at line 326
array
getDynamicProperties()
Returns all dynamic properties and their values
in
ExtendableTrait at line 344
bool
propertyExists(string $name)
Checks if a property exists, extension equivalent of property_exists()
in
ExtendableTrait at line 370
protected bool
extendableIsAccessible(mixed $class, string $propertyName)
Checks if a property is accessible, property equivalent of is_callabe()
in
ExtendableTrait at line 385
string
extendableGet(string $name)
Magic method for __get()
in
ExtendableTrait at line 410
string
extendableSet(string $name, string $value)
Magic method for __set()
in
ExtendableTrait at line 444
mixed
extendableCall(string $name, array $params = null)
Magic method for __call()
in
ExtendableTrait at line 483
static mixed
extendableCallStatic(string $name, array $params = null)
Magic method for __callStatic()
in
ExtendableTrait at line 552
protected ClassLoader|null
extensionGetClassLoader()
Gets the class loader
at line 73
__construct()
Class constructor
in
AdminController at line 122
protected
definePaths()
No description
in
AdminController at line 157
initialize()
No description
in
AdminController at line 186
remap($action, $params)
No description
in
AdminController at line 237
checkAction($action)
No description
in
AdminController at line 254
pageAction()
No description
in
AdminController at line 264
getClass()
No description
in
AdminController at line 269
getAction()
No description
in
AdminController at line 274
protected
execPageAction($action, $params)
No description
in
AdminController at line 298
protected
makeMainMenuWidget()
No description
in
AdminController at line 319
string
getHandler()
Returns the AJAX handler for the current request, if available.
in
AdminController at line 330
protected
processHandlers()
No description
in
AdminController at line 389
protected
validateHandler($handler)
No description
in
AdminController at line 396
protected
validateHandlerPartials()
No description
in
AdminController at line 416
getUserLocation()
No description
in
AdminController at line 421
getLocationId()
No description
in
AdminController at line 430
pageUrl($path = null, $parameters = [], $secure = null)
No description
in
AdminController at line 435
redirect($path, $status = 302, $headers = [], $secure = null)
No description
in
AdminController at line 440
redirectGuest($path, $status = 302, $headers = [], $secure = null)
No description
in
AdminController at line 445
redirectIntended($path, $status = 302, $headers = [], $secure = null)
No description
in
AdminController at line 450
redirectBack($status = 302, $headers = [], $fallback = false)
No description
in
AdminController at line 455
refresh()
No description
in
AdminController at line 460
protected
runHandler($handler, $params)
No description
in
AdminController at line 519
handleError(Exception $exception)
Sets standard page variables in the case of a controller error.
in
AdminController at line 532
__get($name)
No description
in
AdminController at line 537
__set($name, $value)
No description
in
AdminController at line 542
__call($name, $params)
No description
in
AdminController at line 547
static
__callStatic($name, $params)
No description
in
AdminController at line 552
static
extend(callable $callback)
No description
at line 80
index()
No description
at line 87
index_onDelete()
No description
at line 95
index_onUpdateStatus()
No description
at line 110
edit_onDelete()
No description
at line 118
calendarGenerateEvents($startAt, $endAt)
No description
at line 125
calendarUpdateEvent($eventId, $startAt, $endAt)
No description
at line 140
formExtendQuery($query)
No description