TestAccessCheck.php

Same filename in other branches
  1. 8.9.x core/modules/system/tests/modules/router_test_directory/src/Access/TestAccessCheck.php
  2. 10 core/modules/system/tests/modules/router_test_directory/src/Access/TestAccessCheck.php
  3. 11.x core/modules/system/tests/modules/router_test_directory/src/Access/TestAccessCheck.php

Namespace

Drupal\router_test\Access

File

core/modules/system/tests/modules/router_test_directory/src/Access/TestAccessCheck.php

View source
<?php

namespace Drupal\router_test\Access;

use Drupal\Core\Access\AccessResult;
use Drupal\Core\Routing\Access\AccessInterface;

/**
 * Access check for test routes.
 */
class TestAccessCheck implements AccessInterface {
    
    /**
     * Checks access.
     *
     * @return \Drupal\Core\Access\AccessResultInterface
     *   The access result.
     */
    public function access() {
        // No opinion, so other access checks should decide if access should be
        // allowed or not.
        return AccessResult::neutral();
    }

}

Classes

Title Deprecated Summary
TestAccessCheck Access check for test routes.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.