public function UserCacheContextBase::__construct
public UserCacheContextBase::__construct(AccountInterface $user)
Constructs a new UserCacheContextBase class.
Parameters
\Drupal\Core\Session\AccountInterface $user: The current user.
File
- core/lib/Drupal/Core/Cache/Context/UserCacheContextBase.php, line 29
Class
- UserCacheContextBase
- Base class for user-based cache contexts.
Namespace
Drupal\Core\Cache\ContextCode
public function __construct(AccountInterface $user) { $this->user = $user; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Cache!Context!UserCacheContextBase.php/function/UserCacheContextBase::__construct/8.1.x