public AccessResult::setCacheMaxAge($max_age)
Sets the maximum age for which this access result may be cached.
Parameters
int $max_age: The maximum time in seconds that this access result may be cached.
Return value
$this
File
- core/lib/Drupal/Core/Access/AccessResult.php, line 229
Class
- AccessResult
- Value object for passing an access result with cacheability metadata.
Namespace
Drupal\Core\Access
Code
1 2 3 4 | public function setCacheMaxAge( $max_age ) { $this ->cacheMaxAge = $max_age ; return $this ; } |
Please login to continue.