Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!10295
Resolve
#3479141
"Implement FormAlter attribute"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Resolve
#3479141
"Implement FormAlter attribute"
issue/drupal-3479141:3479141-determine-how-to
into
11.x
Overview
66
Commits
27
Pipelines
25
Changes
4
Closed
nicxvan
requested to merge
issue/drupal-3479141:3479141-determine-how-to
into
11.x
6 months ago
Overview
31
Commits
27
Pipelines
25
Changes
4
Expand
Closes
#3479141
0
0
Merge request reports
Compare
11.x
version 24
2aeb106c
1 month ago
version 23
2681fb89
1 month ago
version 22
50424e1a
1 month ago
version 21
065d1ab4
1 month ago
version 20
f55bd9df
1 month ago
version 19
5ffc34e6
2 months ago
version 18
9feaed1f
2 months ago
version 17
e9d815cb
2 months ago
version 16
13b6306f
2 months ago
version 15
d5031ff2
3 months ago
version 14
cda7eb83
3 months ago
version 13
4f192a47
3 months ago
version 12
cbd4a303
3 months ago
version 11
4e97f88a
3 months ago
version 10
11f2c8a1
4 months ago
version 9
bd5976cc
4 months ago
version 8
1e63fdab
5 months ago
version 7
d5d5118a
5 months ago
version 6
940dcfa1
6 months ago
version 5
0886b5c2
6 months ago
version 4
8fda13df
6 months ago
version 3
c03fff8f
6 months ago
version 2
8ea9582c
6 months ago
version 1
f6aae572
6 months ago
11.x (base)
and
latest version
latest version
6215981f
27 commits,
1 month ago
version 24
2aeb106c
26 commits,
1 month ago
version 23
2681fb89
24 commits,
1 month ago
version 22
50424e1a
23 commits,
1 month ago
version 21
065d1ab4
22 commits,
1 month ago
version 20
f55bd9df
21 commits,
1 month ago
version 19
5ffc34e6
19 commits,
2 months ago
version 18
9feaed1f
18 commits,
2 months ago
version 17
e9d815cb
17 commits,
2 months ago
version 16
13b6306f
16 commits,
2 months ago
version 15
d5031ff2
15 commits,
3 months ago
version 14
cda7eb83
13 commits,
3 months ago
version 13
4f192a47
12 commits,
3 months ago
version 12
cbd4a303
12 commits,
3 months ago
version 11
4e97f88a
11 commits,
3 months ago
version 10
11f2c8a1
10 commits,
4 months ago
version 9
bd5976cc
10 commits,
4 months ago
version 8
1e63fdab
9 commits,
5 months ago
version 7
d5d5118a
8 commits,
5 months ago
version 6
940dcfa1
7 commits,
6 months ago
version 5
0886b5c2
6 commits,
6 months ago
version 4
8fda13df
5 commits,
6 months ago
version 3
c03fff8f
4 commits,
6 months ago
version 2
8ea9582c
3 commits,
6 months ago
version 1
f6aae572
2 commits,
6 months ago
4 files
+
126
−
52
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
core/lib/Drupal/Core/Hook/Attribute/FormAlter.php
0 → 100644
+
49
−
0
Options
<?php
declare
(
strict_types
=
1
);
namespace
Drupal\Core\Hook\Attribute
;
/**
* Hook attribute for FormAlter.
*
* @see hook_form_alter().
*/
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
class
FormAlter
extends
Hook
{
/**
* {@inheritdoc}
*/
public
const
string
PREFIX
=
'form'
;
/**
* {@inheritdoc}
*/
public
const
string
SUFFIX
=
'alter'
;
/**
* Constructs a FormAlter attribute object.
*
* @param string $form_id
* (optional) The ID of the form that this implementation alters.
* If this is left blank then `form_alter` is the hook that is registered.
* @param string $method
* (optional) The method name. If this attribute is on a method, this
* parameter is not required. If this attribute is on a class and this
* parameter is omitted, the class must have an __invoke() method, which is
* taken as the hook implementation.
* @param string|null $module
* (optional) The module this implementation is for. This allows one module
* to implement a hook on behalf of another module. Defaults to the module
* the implementation is in.
*/
public
function
__construct
(
string
$form_id
=
''
,
public
string
$method
=
''
,
public
?string
$module
=
NULL
,
)
{
parent
::
__construct
(
$form_id
,
$method
,
$module
);
}
}
Loading