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 105
formCreateModelObject()
Creates a new instance of a form model. This logic can be changed by overriding it in the controller.
at line 117
void
formExtendFieldsBefore(Form $host)
Called before the form fields are defined.
at line 128
void
formExtendFields(Form $host, $fields)
Called after the form fields are defined.
at line 140
array
formExtendRefreshData(Form $host, array $saveData)
Called before the form is refreshed, should return an array of additional save data.
at line 152
array
formExtendRefreshFields(Form $host, array $fields)
Called when the form is refreshed, giving the opportunity to modify the form fields.
at line 164
array
formExtendRefreshResults(Form $host, array $result)
Called after the form is refreshed, should return an array of additional result parameters.
at line 176
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 188
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 192
formExtendConfig($formConfig)
No description
at line 203
static void
extendFormFields(callable $callback)
Static helper for extending form fields.