You are here

public function DataPolicyInformController::access in Data Policy 8

Check if exist entity.

Parameters

string $informblock: The 'informblock' entity ID.

Return value

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

1 string reference to 'DataPolicyInformController::access'
data_policy.routing.yml in ./data_policy.routing.yml
data_policy.routing.yml

File

src/Controller/DataPolicyInformController.php, line 52

Class

DataPolicyInformController
Class DataPolicyInformController.

Namespace

Drupal\data_policy\Controller

Code

public function access($informblock) {
  if (InformBlock::load($informblock) instanceof InformBlockInterface) {
    return AccessResult::allowed();
  }
  return AccessResult::forbidden();
}