Skip to content
Snippets Groups Projects
Commit 30def1f5 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2272267 by tim.plunkett: Entity_page_access() and entity_page_create_access() are dead code.

parent df710a89
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment