Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AccessResult.php

function AccessResult::allowed

Creates an AccessResultInterface object with isAllowed() === TRUE.

Return value

\Drupal\Core\Access\AccessResultAllowed isAllowed() will be TRUE.

37 calls to AccessResult::allowed()
AccessManager::check in core/lib/Drupal/Core/Access/AccessManager.php
Checks a route against applicable access check services.
AccessResult::allowedIf in core/lib/Drupal/Core/Access/AccessResult.php
Creates an allowed or neutral access result.
AccessResult::andIf in core/lib/Drupal/Core/Access/AccessResult.php
Combine this access result with another using AND.
AccessResult::orIf in core/lib/Drupal/Core/Access/AccessResult.php
Combine this access result with another using OR.
BlockPluginTrait::blockAccess in core/lib/Drupal/Core/Block/BlockPluginTrait.php
Indicates whether the block should be shown.

... See full list

File

core/lib/Drupal/Core/Access/AccessResult.php, line 50

Class

AccessResult
Value object for passing an access result with cacheability metadata.

Namespace

Drupal\Core\Access

Code

public static function allowed() {
    return new AccessResultAllowed();
}
RSS feed
Powered by Drupal