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
30def1f5
Commit
30def1f5
authored
10 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2272267
by tim.plunkett: Entity_page_access() and entity_page_create_access() are dead code.
parent
df710a89
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/includes/entity.inc
+0
-31
0 additions, 31 deletions
core/includes/entity.inc
with
0 additions
and
31 deletions
core/includes/entity.inc
+
0
−
31
View file @
30def1f5
...
...
@@ -512,34 +512,3 @@ function entity_get_form_display($entity_type, $bundle, $form_mode) {
return
$entity_form_display
;
}
/**
* Generic access callback for entity pages.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity for which access is being checked.
* @param string $operation
* (optional) The operation being performed on the entity. Defaults to 'view'.
*
* @return bool
* TRUE if the access is granted. FALSE if access is denied.
*/
function
entity_page_access
(
EntityInterface
$entity
,
$operation
=
'view'
)
{
return
$entity
->
access
(
$operation
);
}
/**
* Generic access callback for create entity pages.
*
* @param string $entity_type
* The entity type.
* @param string $bundle
* (optional) The bundle of the entity. Required if the entity supports
* bundles, defaults to NULL otherwise.
*
* @return bool
* TRUE if the access is granted. FALSE if access is denied.
*/
function
entity_page_create_access
(
$entity_type
,
$bundle
=
NULL
)
{
return
\Drupal
::
entityManager
()
->
getAccessController
(
$entity_type
)
->
createAccess
(
$bundle
);
}
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