public static function AccessResult::neutral in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Access/AccessResult.php \Drupal\Core\Access\AccessResult::neutral()
Creates an AccessResultInterface object with isNeutral() === TRUE.
Parameters
string|null $reason: (optional) The reason why access is neutral. Intended for developers, hence not translatable.
Return value
\Drupal\Core\Access\AccessResultNeutral isNeutral() will be TRUE.
97 calls to AccessResult::neutral()
- AccessGroupAnd::access in core/
modules/ block_content/ src/ Access/ AccessGroupAnd.php - Checks data value access.
- AccessGroupAndTest::testGroups in core/
modules/ block_content/ tests/ src/ Unit/ Access/ AccessGroupAndTest.php - @covers \Drupal\block_content\Access\AccessGroupAnd
- AccessManager::check in core/
lib/ Drupal/ Core/ Access/ AccessManager.php - Checks a route against applicable access check services.
- AccessManagerTest::providerTestCheckConjunctions in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessManagerTest.php - Provides data for the conjunction test.
- AccessManagerTest::testCheck in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessManagerTest.php - Tests \Drupal\Core\Access\AccessManager::check().
File
- core/
lib/ Drupal/ Core/ Access/ AccessResult.php, line 41
Class
- AccessResult
- Value object for passing an access result with cacheability metadata.
Namespace
Drupal\Core\AccessCode
public static function neutral($reason = NULL) {
assert(is_string($reason) || is_null($reason));
return new AccessResultNeutral($reason);
}