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
Commits
8af814f7
Commit
8af814f7
authored
8 years ago
by
Alex Pott
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2843678
by Sam152: Remove dead code in hook_entity_bundle_field_info_alter
parent
38092ac0
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/modules/content_moderation/content_moderation.module
+0
-9
0 additions, 9 deletions
core/modules/content_moderation/content_moderation.module
core/modules/content_moderation/src/EntityTypeInfo.php
+0
-18
0 additions, 18 deletions
core/modules/content_moderation/src/EntityTypeInfo.php
with
0 additions
and
27 deletions
core/modules/content_moderation/content_moderation.module
+
0
−
9
View file @
8af814f7
...
@@ -72,15 +72,6 @@ function content_moderation_entity_operation(EntityInterface $entity) {
...
@@ -72,15 +72,6 @@ function content_moderation_entity_operation(EntityInterface $entity) {
->
entityOperation
(
$entity
);
->
entityOperation
(
$entity
);
}
}
/**
* Sets required flag based on enabled state.
*/
function
content_moderation_entity_bundle_field_info_alter
(
&
$fields
,
EntityTypeInterface
$entity_type
,
$bundle
)
{
\Drupal
::
service
(
'class_resolver'
)
->
getInstanceFromDefinition
(
EntityTypeInfo
::
class
)
->
entityBundleFieldInfoAlter
(
$fields
,
$entity_type
,
$bundle
);
}
/**
/**
* Implements hook_entity_presave().
* Implements hook_entity_presave().
*/
*/
...
...
This diff is collapsed.
Click to expand it.
core/modules/content_moderation/src/EntityTypeInfo.php
+
0
−
18
View file @
8af814f7
...
@@ -333,24 +333,6 @@ public function entityBaseFieldInfo(EntityTypeInterface $entity_type) {
...
@@ -333,24 +333,6 @@ public function entityBaseFieldInfo(EntityTypeInterface $entity_type) {
return
$fields
;
return
$fields
;
}
}
/**
* Adds ModerationState constraint to bundles whose entities are moderated.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface[] $fields
* The array of bundle field definitions.
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param string $bundle
* The bundle.
*
* @see hook_entity_bundle_field_info_alter();
*/
public
function
entityBundleFieldInfoAlter
(
&
$fields
,
EntityTypeInterface
$entity_type
,
$bundle
)
{
if
(
!
empty
(
$fields
[
'moderation_state'
])
&&
$this
->
moderationInfo
->
shouldModerateEntitiesOfBundle
(
$entity_type
,
$bundle
))
{
$fields
[
'moderation_state'
]
->
addConstraint
(
'ModerationState'
,
[]);
}
}
/**
/**
* Alters bundle forms to enforce revision handling.
* Alters bundle forms to enforce revision handling.
*
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment