function PrepareModulesEntityUninstallForm::checkAccess

Same name in other branches
  1. 11.x core/modules/system/src/Form/PrepareModulesEntityUninstallForm.php \Drupal\system\Form\PrepareModulesEntityUninstallForm::checkAccess()

Checks access based on the validity of the entity type ID.

Parameters

string $entity_type_id: Entity type ID.

Return value

\Drupal\Core\Access\AccessResultInterface The access result.

1 string reference to 'PrepareModulesEntityUninstallForm::checkAccess'
system.routing.yml in core/modules/system/system.routing.yml
core/modules/system/system.routing.yml

File

core/modules/system/src/Form/PrepareModulesEntityUninstallForm.php, line 122

Class

PrepareModulesEntityUninstallForm
Provides a form removing module content entities data before uninstallation.

Namespace

Drupal\system\Form

Code

public static function checkAccess(string $entity_type_id) : AccessResultInterface {
    return AccessResult::allowedIf(\Drupal::entityTypeManager()->hasDefinition($entity_type_id));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.