abstract class FormsComponent extends Component implements HasForms (View source)

Traits

Properties

string[] $mountedFormComponentActions from  HasFormComponentActions
array<string,array<string,mixed>> $mountedFormComponentActionsArguments from  HasFormComponentActions
array<string,array<string,mixed>> $mountedFormComponentActionsData from  HasFormComponentActions
string[] $mountedFormComponentActionsComponents from  HasFormComponentActions
ComponentContainer $mountedFormComponentActionForm from  HasFormComponentActions
array $componentFileAttachments from  InteractsWithForms
protected Form> $cachedForms from  InteractsWithForms
protected bool $hasCachedForms from  InteractsWithForms
protected bool $isCachingForms from  InteractsWithForms
protected bool $hasFormsModalRendered from  InteractsWithForms
protected array<string,mixed> $oldFormState from  InteractsWithForms

Methods

mixed
callMountedFormComponentAction(array $arguments = [])

No description

mixed
mountFormComponentAction(string $component, string $name, array $arguments = [])

No description

void
cacheMountedFormComponentActionForm(Action|null $mountedAction = null)

No description

bool
mountedFormComponentActionShouldOpenModal(Action|null $mountedAction = null)

No description

bool
mountedFormComponentActionHasForm(Action|null $mountedAction = null)

No description

Action|null
getMountedFormComponentAction(int|null $actionNestingIndex = null)

No description

Form|null
getMountedFormComponentActionForm(int|null $actionNestingIndex = null, Action|null $mountedAction = null)

No description

Component|null
getMountedFormComponentActionComponent(int|null $actionNestingIndex = null)

No description

string|null
void
unmountFormComponentAction(bool $shouldCancelParentActions = true, bool $shouldCloseModal = true)

No description

void
closeFormComponentActionModal(bool $shouldCloseModal = true)

No description

mixed
__get(string $property)

No description

void
dispatchFormEvent(mixed ...$args)

No description

void
fillFormDataForTesting(array $state = [])

No description

void
unsetMissingNumericArrayKeys(array $target, array $state)

No description

TemporaryUploadedFile|null
getFormComponentFileAttachment(string $statePath)

No description

string|null
getFormComponentFileAttachmentUrl(string $statePath)

No description

array
getFormSelectOptionLabels(string $statePath)

No description

string|null
getFormSelectOptionLabel(string $statePath)

No description

array
getFormSelectOptions(string $statePath)

No description

array
getFormSelectSearchResults(string $statePath, string $search)

No description

void
deleteUploadedFile(string $statePath, string $fileKey)

No description

array|null
getFormUploadedFiles(string $statePath)

No description

void
removeFormUploadedFile(string $statePath, string $fileKey)

No description

void
reorderFormUploadedFiles(string $statePath, array $fileKeys)

No description

array
validate($rules = null, array<string,string> $messages = [], array<string,string> $attributes = [])

No description

array<string,mixed>
validateOnly(string $field, array<string,array> $rules = null, array<string,string> $messages = [], array<string,string> $attributes = [], array<string,string> $dataOverrides = [])

No description

void
onValidationError(ValidationException $exception)

No description

array
prepareForValidation(array<string,mixed> $attributes)

No description

string|null
TranslatableContentDriver|null
string|null
getActiveFormsLocale()

No description

void
updatingInteractsWithForms(string $statePath)

No description

mixed
getOldFormState(string $statePath)

No description

void
updatedInteractsWithForms(string $statePath)

No description

Form|null
cacheForm(string $name, Form|Closure|null $form)

No description

array
cacheForms()

No description

array
getTraitForms()

No description

bool
hasCachedForm(string $name)

No description

Form|null
getForm(string $name)

No description

array
getCachedForms()

No description

array
getForms()

No description

form(Form $form)

No description

Model|string|null
getFormModel() deprecated

No description

array
getFormSchema() deprecated

No description

string|null
getFormContext() deprecated

No description

string|null
getFormStatePath() deprecated

No description

array
getRules()

No description

array
getValidationAttributes()

No description

makeForm()

No description

bool
isCachingForms()

No description

Details

mixed callMountedFormComponentAction(array $arguments = [])

No description

Parameters

array $arguments

Return Value

mixed

mixed mountFormComponentAction(string $component, string $name, array $arguments = [])

No description

Parameters

string $component
string $name
array $arguments

Return Value

mixed

protected void cacheMountedFormComponentActionForm(Action|null $mountedAction = null)

No description

Parameters

Action|null $mountedAction

Return Value

void

bool mountedFormComponentActionShouldOpenModal(Action|null $mountedAction = null)

No description

Parameters

Action|null $mountedAction

Return Value

bool

bool mountedFormComponentActionHasForm(Action|null $mountedAction = null)

No description

Parameters

Action|null $mountedAction

Return Value

bool

Action|null getMountedFormComponentAction(int|null $actionNestingIndex = null)

No description

Parameters

int|null $actionNestingIndex

Return Value

Action|null

protected Form|null getMountedFormComponentActionForm(int|null $actionNestingIndex = null, Action|null $mountedAction = null)

No description

Parameters

int|null $actionNestingIndex
Action|null $mountedAction

Return Value

Form|null

Component|null getMountedFormComponentActionComponent(int|null $actionNestingIndex = null)

No description

Parameters

int|null $actionNestingIndex

Return Value

Component|null

protected void resetMountedFormComponentActionProperties()

No description

Return Value

void

protected string|null popMountedFormComponentAction()

No description

Return Value

string|null

void unmountFormComponentAction(bool $shouldCancelParentActions = true, bool $shouldCloseModal = true)

No description

Parameters

bool $shouldCancelParentActions
bool $shouldCloseModal

Return Value

void

protected void closeFormComponentActionModal(bool $shouldCloseModal = true)

No description

Parameters

bool $shouldCloseModal

Return Value

void

protected void openFormComponentActionModal()

No description

Return Value

void

mixed __get(string $property)

No description

Parameters

string $property

Return Value

mixed

Exceptions

PropertyNotFoundException

void dispatchFormEvent(mixed ...$args)

No description

Parameters

mixed ...$args

Return Value

void

void fillFormDataForTesting(array $state = [])

No description

Parameters

array $state

Return Value

void

protected void unsetMissingNumericArrayKeys(array $target, array $state)

No description

Parameters

array $target
array $state

Return Value

void

TemporaryUploadedFile|null getFormComponentFileAttachment(string $statePath)

No description

Parameters

string $statePath

Return Value

TemporaryUploadedFile|null

string|null getFormComponentFileAttachmentUrl(string $statePath)

No description

Parameters

string $statePath

Return Value

string|null

array getFormSelectOptionLabels(string $statePath)

No description

Parameters

string $statePath

Return Value

array

string|null getFormSelectOptionLabel(string $statePath)

No description

Parameters

string $statePath

Return Value

string|null

array getFormSelectOptions(string $statePath)

No description

Parameters

string $statePath

Return Value

array

array getFormSelectSearchResults(string $statePath, string $search)

No description

Parameters

string $statePath
string $search

Return Value

array

void deleteUploadedFile(string $statePath, string $fileKey)

No description

Parameters

string $statePath
string $fileKey

Return Value

void

array|null getFormUploadedFiles(string $statePath)

No description

Parameters

string $statePath

Return Value

array|null

void removeFormUploadedFile(string $statePath, string $fileKey)

No description

Parameters

string $statePath
string $fileKey

Return Value

void

void reorderFormUploadedFiles(string $statePath, array $fileKeys)

No description

Parameters

string $statePath
array $fileKeys

Return Value

void

array validate($rules = null, array<string,string> $messages = [], array<string,string> $attributes = [])

No description

Parameters

$rules
array<string,string> $messages
array<string,string> $attributes

Return Value

array

array<string,mixed> validateOnly(string $field, array<string,array> $rules = null, array<string,string> $messages = [], array<string,string> $attributes = [], array<string,string> $dataOverrides = [])

No description

Parameters

string $field
array<string,array> $rules
array<string,string> $messages
array<string,string> $attributes
array<string,string> $dataOverrides

Return Value

array<string,mixed>

protected void onValidationError(ValidationException $exception)

No description

Parameters

ValidationException $exception

Return Value

void

protected array prepareForValidation(array<string,mixed> $attributes)

No description

Parameters

array<string,mixed> $attributes

Return Value

array

string|null getFilamentTranslatableContentDriver()

No description

Return Value

string|null

| null

TranslatableContentDriver|null makeFilamentTranslatableContentDriver()

No description

Return Value

TranslatableContentDriver|null

string|null getActiveFormsLocale()

No description

Return Value

string|null

void updatingInteractsWithForms(string $statePath)

No description

Parameters

string $statePath

Return Value

void

mixed getOldFormState(string $statePath)

No description

Parameters

string $statePath

Return Value

mixed

void updatedInteractsWithForms(string $statePath)

No description

Parameters

string $statePath

Return Value

void

protected Form|null cacheForm(string $name, Form|Closure|null $form)

No description

Parameters

string $name
Form|Closure|null $form

Return Value

Form|null

protected array cacheForms()

No description

Return Value

array

array getTraitForms()

No description

Return Value

array

protected bool hasCachedForm(string $name)

No description

Parameters

string $name

Return Value

bool

Form|null getForm(string $name)

No description

Parameters

string $name

Return Value

Form|null

array getCachedForms()

No description

Return Value

array

protected array getForms()

No description

Return Value

array

Form form(Form $form)

No description

Parameters

Form $form

Return Value

Form

protected Model|string|null getFormModel() deprecated

deprecated Override the `form()` method to configure the default form.

No description

Return Value

Model|string|null

protected array getFormSchema() deprecated

deprecated Override the `form()` method to configure the default form.

No description

Return Value

array

protected string|null getFormContext() deprecated

deprecated Override the `form()` method to configure the default form.

No description

Return Value

string|null

protected string|null getFormStatePath() deprecated

deprecated Override the `form()` method to configure the default form.

No description

Return Value

string|null

array getRules()

No description

Return Value

array

protected array getValidationAttributes()

No description

Return Value

array

protected Form makeForm()

No description

Return Value

Form

bool isCachingForms()

No description

Return Value

bool

Infolist mountedFormComponentActionInfolist()

No description

Return Value

Infolist