You are here

public function AuthcacheViewsFragment::check in Authenticated User Page Caching (Authcache) 7.2

Check whether the user has access to the given fragment.

Parameters

object $account: The user account to check.

string $key: The key for the fragment to be checked.

var $subject: The result of the loader function for the given key. If no AuthcacheP13nFragmentLoader is associated with this fragment, subject is equal to key.

array $context: Additional run-time per-request context (key-value pairs).

Return value

bool Return TRUE when the user has access, FALSE otherwise.

Overrides AuthcacheP13nFragmentAccessInterface::check

File

modules/authcache_views/includes/AuthcacheViewsFragment.inc, line 53
Defines personalization fragment for views

Class

AuthcacheViewsFragment
Personalization fragment for rendered views.

Code

public function check($account, $view_name, $view, $context) {
  return $view
    ->access(array(
    $view->current_display,
  ), $account);
}