public function campaignPagesReportsAccess(NodeInterface $node, AccountInterface $account) {
    return AccessResult::allowedIf($account->hasPermission('view retention campaign reports') && $node->getType() == 'campaign');
  }
public function campaignPagesReportsAccess(NodeInterface $node, AccountInterface $account) {
    return AccessResult::allowedIf($account->hasPermission('view retention campaign reports') && $node->getType() == 'campaign');
  }
public function campaignPagesReportsAccess ( NodeInterface $ node , AccountInterface $ account ) { return AccessResult :: allowedIf ( $ account -> hasPermission ( 'view retention campaign reports' ) && $ node -> getType ( ) == 'campaign' ) ; }
Checks access for a specific request.

@param \Drupal\node\NodeInterface $node
Node.
@param \Drupal\Core\Session\AccountInterface $account
Run access checks for this account.

@return \Drupal\Core\Access\AccessResult
Checks access for a specific request .