LocationArea
class LocationArea extends FormRequest
Traits
Adds event related features to any class.
Constants
protected DATA_TYPE_FORM |
|
protected DATA_TYPE_POST |
|
protected DATA_TYPE_INPUT |
|
Properties
protected array | $emitterSingleEvents | from EventEmitter | |
protected array | $emitterEvents | from EventEmitter | |
protected array | $emitterEventSorted | from EventEmitter | |
protected AdminController | $controller | from FormRequest | |
protected | $inputKey | from FormRequest |
Methods
Returns whether or not the model will add it's unique identifier to the rules when validating.
Set the model to add unique identifier to rules when performing validation.
If the model already exists and it has unique validations it is going to fail validation unless we also pass it's primary key to the rule so that it may be ignored.
Get the dynamic method name for a unique identifier or custom injector rule if it exists, otherwise return false.
Prepare a rule, adding the table name, column and model identifier if required.
Prepare a unique_with rule, adding the model identifier if required.
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.
No description
Create the default validator instance.
No description
No description
Details
in
RuleInjector at line 15
bool
getInjectRuleParameters()
Returns whether or not the model will add it's unique identifier to the rules when validating.
in
RuleInjector at line 27
void
setInjectRuleParameters(bool $value)
Set the model to add unique identifier to rules when performing validation.
in
RuleInjector at line 44
protected array
injectParametersToRules(array $rules)
If the model already exists and it has unique validations it is going to fail validation unless we also pass it's primary key to the rule so that it may be ignored.
This will go through all the rules and append the model's primary key to the unique rules so that the validation will work as expected.
in
RuleInjector at line 76
protected mixed
getRuleInjectorMethod(string $validationRule)
Get the dynamic method name for a unique identifier or custom injector rule if it exists, otherwise return false.
in
RuleInjector at line 91
protected string
prepareUniqueRule(array $parameters, string $field)
Prepare a rule, adding the table name, column and model identifier if required.
in
RuleInjector at line 140
protected string
prepareUniqueWithRule(array $parameters, string $field)
Prepare a unique_with rule, adding the model identifier if required.
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
FormRequest at line 36
mixed
getController()
No description
in
FormRequest at line 45
setController(mixed $controller)
No description
in
FormRequest at line 55
bool|string
getInputKey()
No description
in
FormRequest at line 64
FormRequest
setInputKey(bool|string $inputKey)
No description
in
FormRequest at line 71
getWith($key, $default = null)
No description
in
FormRequest at line 79
inputWith($key, $default = null)
No description
at line 53
protected
useDataFrom()
No description
in
FormRequest at line 96
protected Form
getForm()
No description
in
FormRequest at line 104
protected Model|mixed
getModel()
No description
in
FormRequest at line 122
protected Validator
createDefaultValidator(Factory $factory)
Create the default validator instance.
in
FormRequest at line 152
array
validationData()
Get data to be validated from the request.
in
FormRequest at line 176
protected void
failedValidation(Validator $validator)
Handle a failed validation attempt.
at line 9
attributes()
No description
at line 31
rules()
No description