Skip to content

Commit af63a49

Browse files
committed
Update UtilityInjection.astro
1 parent 26ac41c commit af63a49

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

docs/src/components/UtilityInjection.astro

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,98 @@ let utilities = [
1111
...extras,
1212
...{
1313
'4.x': {
14+
actions: [
15+
{
16+
name: 'Action',
17+
type: 'Filament\\Actions\\Action',
18+
parameter: '$action',
19+
description: 'The current action instance.',
20+
},
21+
{
22+
name: 'Arguments',
23+
type: 'array<string, mixed>',
24+
parameter: '$arguments',
25+
description: 'The array of arguments passed to the action when it was triggered.',
26+
},
27+
{
28+
name: 'Data',
29+
type: 'array<string, mixed>',
30+
parameter: '$data',
31+
description: 'The array of data submitted from form fields in the action\'s modal.',
32+
},
33+
{
34+
name: 'Livewire',
35+
type: 'Livewire\\Component',
36+
parameter: '$livewire',
37+
description: 'The Livewire component instance.',
38+
},
39+
{
40+
name: 'Eloquent model FQN',
41+
type: '?string<Illuminate\\Database\\Eloquent\\Model>',
42+
parameter: '$model',
43+
description: 'The Eloquent model FQN for the current action, if one is attached.',
44+
},
45+
{
46+
name: 'Eloquent record',
47+
type: '?Illuminate\\Database\\Eloquent\\Model',
48+
parameter: '$record',
49+
description: 'The Eloquent record for the current action, if one is attached.',
50+
},
51+
{
52+
name: 'Selected Eloquent records',
53+
type: 'Illuminate\\Support\\Collection',
54+
parameter: '$selectedRecords',
55+
description: '[Bulk actions only] The Eloquent records selected in the table.',
56+
},
57+
{
58+
name: 'Mounted actions',
59+
type: 'array<Filament\\Actions\\Action>',
60+
parameter: '$mountedActions',
61+
description: 'The array of actions that are currently mounted in the Livewire component. This is useful for accessing data from parent actions.',
62+
},
63+
{
64+
name: 'Schema',
65+
type: 'Filament\\Schemas\\Schema',
66+
parameter: '$schema',
67+
description: '[Actions in schemas only] The schema object that this action belongs to.',
68+
},
69+
{
70+
name: 'Schema component',
71+
type: 'Filament\\Schemas\\Components\\Component',
72+
parameter: '$schemaComponent',
73+
description: '[Actions in schemas only] The schema component that this action belongs to.',
74+
},
75+
{
76+
name: 'Schema get function',
77+
type: 'Filament\\Schemas\\Components\\Utilities\\Get',
78+
parameter: '$schemaGet',
79+
description: '[Actions in schemas only] A function for retrieving values from the schema data. Validation is not run on form fields.',
80+
},
81+
{
82+
name: 'Schema set function',
83+
type: 'Filament\\Schemas\\Components\\Utilities\\Set',
84+
parameter: '$schemaSet',
85+
description: '[Actions in schemas only] A function for setting values in the schema data.',
86+
},
87+
{
88+
name: 'Schema component state',
89+
type: 'mixed',
90+
parameter: '$schemaComponentState',
91+
description: '[Actions in schemas only] The current value of the schema component.',
92+
},
93+
{
94+
name: 'Schema operation',
95+
type: 'string',
96+
parameter: '$schemaOperation',
97+
description: '[Actions in schemas only] The current operation being performed by the schema. Usually <code>create</code>, <code>edit</code>, or <code>view</code>.',
98+
},
99+
{
100+
name: 'Table',
101+
type: 'Filament\\Tables\\Table',
102+
parameter: '$table',
103+
description: '[Actions in tables only] The table object that this action belongs to.',
104+
},
105+
],
14106
formFields: [
15107
{
16108
name: 'Field',
@@ -209,6 +301,7 @@ let utilities = [
209301
utilities = Array.from(new Map(utilities.map((utility) => [utility.parameter, utility])).values())
210302
211303
const link = {
304+
actions: `/docs/${version}/actions/overview#action-utility-injection`,
212305
formFields: `/docs/${version}/forms/overview#field-utility-injection`,
213306
infolistEntries: `/docs/${version}/infolists/overview#entry-utility-injection`,
214307
schemaComponents: `/docs/${version}/schemas/overview#component-utility-injection`,

0 commit comments

Comments
 (0)