FormExtendable
trait FormExtendable
Methods
Called to validate create or edit form.
Called before the creation or updating form is saved.
Called after the creation or updating form is saved.
Called before the creation form is saved.
Called after the creation form is saved.
Called before the updating form is saved.
Called after the updating form is saved.
Called after the form model is deleted.
Finds a Model record by its primary identifier, used by edit actions. This logic can be changed by overriding it in the controller.
Creates a new instance of a form model. This logic can be changed by overriding it in the controller.
Called before the form is refreshed, should return an array of additional save data.
Called when the form is refreshed, giving the opportunity to modify the form fields.
Called after the form is refreshed, should return an array of additional result parameters.
Extend supplied model used by create and edit actions, the model can be altered by overriding it in the controller.
Extend the query used for finding the form model. Extra conditions can be applied to the query, for example, $query->withTrashed();
No description
Static helper for extending form fields.
Details
at line 13
formValidate($model, $form)
Called to validate create or edit form.
at line 20
formBeforeSave($model)
Called before the creation or updating form is saved.
at line 27
formAfterSave($model)
Called after the creation or updating form is saved.
at line 34
formBeforeCreate($model)
Called before the creation form is saved.
at line 41
formAfterCreate($model)
Called after the creation form is saved.
at line 48
formBeforeUpdate($model)
Called before the updating form is saved.
at line 55
formAfterUpdate($model)
Called after the updating form is saved.
at line 62
formAfterDelete($model)
Called after the form model is deleted.
at line 75
formFindModelObject(string $recordId)
Finds a Model record by its primary identifier, used by edit actions. This logic can be changed by overriding it in the controller.
at line 108
formCreateModelObject()
Creates a new instance of a form model. This logic can be changed by overriding it in the controller.
at line 120
void
formExtendFieldsBefore(Form $host)
Called before the form fields are defined.
at line 131
void
formExtendFields(Form $host, $fields)
Called after the form fields are defined.
at line 143
array
formExtendRefreshData(Form $host, array $saveData)
Called before the form is refreshed, should return an array of additional save data.
at line 155
array
formExtendRefreshFields(Form $host, array $fields)
Called when the form is refreshed, giving the opportunity to modify the form fields.
at line 167
array
formExtendRefreshResults(Form $host, array $result)
Called after the form is refreshed, should return an array of additional result parameters.
at line 179
formExtendModel(Model $model)
Extend supplied model used by create and edit actions, the model can be altered by overriding it in the controller.
at line 191
void
formExtendQuery(Builder $query)
Extend the query used for finding the form model. Extra conditions can be applied to the query, for example, $query->withTrashed();
at line 195
formExtendConfig($formConfig)
No description
at line 206
static void
extendFormFields(callable $callback)
Static helper for extending form fields.