public function ApiDocReimportSpecForm::checkAccess in Apigee API Catalog 8.2
Checks access for the form page.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.
\Drupal\Core\Session\AccountInterface $account: Run access checks for this account.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
1 string reference to 'ApiDocReimportSpecForm::checkAccess'
File
- src/
Entity/ Form/ ApiDocReimportSpecForm.php, line 103
Class
- ApiDocReimportSpecForm
- Class ApiDocReimportSpecForm.
Namespace
Drupal\apigee_api_catalog\Entity\FormCode
public function checkAccess(RouteMatchInterface $route_match, AccountInterface $account) {
/** @var \Drupal\node\NodeInterface $entity */
$entity = $route_match
->getParameter('node');
return AccessResult::allowedIf($entity
->bundle() == 'apidoc' && $entity
->access('update', $account));
}