getRequirement('_entity_access'); [$entity_type, $operation] = explode('.', $requirement); // If $entity_type parameter is a valid entity, call its own access check. $parameters = $route_match->getParameters(); if ($parameters->has($entity_type)) { $entity = $parameters->get($entity_type); if ($entity instanceof EntityInterface) { return $entity->access($operation, $account, TRUE); } } // No opinion, so other access checks should decide if access should be // allowed or not. return AccessResult::neutral(); } }