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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!12128
Remove extended hook attributes
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Closed
Remove extended hook attributes
issue/drupal-3523109:3523109-remove-explict-inheritance
into
11.x
Overview
0
Commits
17
Pipelines
1
Changes
11
Closed
Remove extended hook attributes
nicxvan
requested to merge
issue/drupal-3523109:3523109-remove-explict-inheritance
into
11.x
2 months ago
Overview
0
Commits
17
Pipelines
1
Changes
11
Co-authored-by: Andreas Hennings
11336-donquixote@users.noreply.drupalcode.org
Closes
#3523109
0
0
Merge request reports
Compare
11.x
11.x (base)
and
latest version
latest version
a7e254e1
17 commits,
2 months ago
11 files
+
20
−
119
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
11
core/lib/Drupal/Core/Hook/Attribute/FormAlter.php deleted
100644 → 0
+
0
−
54
View file @ f0f29018
<?php
declare
(
strict_types
=
1
);
namespace
Drupal\Core\Hook\Attribute
;
use
Drupal\Core\Hook\Order\OrderInterface
;
/**
* 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.
* @param \Drupal\Core\Hook\Order\OrderInterface|null $order
* (optional) Set the order of the implementation.
*/
public
function
__construct
(
string
$form_id
=
''
,
public
string
$method
=
''
,
public
?string
$module
=
NULL
,
public
?OrderInterface
$order
=
NULL
,
)
{
parent
::
__construct
(
$form_id
,
$method
,
$module
,
$order
);
}
}
Loading