You are here

AuthcacheP13nFragmentAccessInterface.inc in Authenticated User Page Caching (Authcache) 7.2

Defines authcache personalized fragment access checker.

File

modules/authcache_p13n/includes/AuthcacheP13nFragmentAccessInterface.inc
View source
<?php

/**
 * @file
 * Defines authcache personalized fragment access checker.
 */

/**
 * Interface for personalization fragment access checkers.
 */
interface AuthcacheP13nFragmentAccessInterface {

  /**
   * Check whether the user has access to the given fragment.
   *
   * @param object $account
   *   The user account to check.
   *
   * @param string $key
   *   The key for the fragment to be checked.
   *
   * @param 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.
   *
   * @param array $context
   *   Additional run-time per-request context (key-value pairs).
   *
   * @return bool
   *   Return TRUE when the user has access, FALSE otherwise.
   */
  public function check($account, $key, $subject, $context);

}

Interfaces

Namesort descending Description
AuthcacheP13nFragmentAccessInterface Interface for personalization fragment access checkers.