You are here

function hook_authcache_p13n_fragment in Authenticated User Page Caching (Authcache) 7.2

Declare markup fragments which contain personalized information.

Return an associative array where the key represents the fragment id and the value an array with the following keys:

  • fragment': The name of the class used to build the markup. The class must implement the AuthcacheP13nFragmentInterface.
  • fragment validator: (Optional) The name of the class used to validate the parameters for the fragment renderer. The class must implement the AuthcacheP13nFragmentValidator interface. If not given, the 'fragment' instance is used if it implements the interface mentioned before.
  • fragment loader: (Optional) The name of the class used to load the necessary data. The class must implement the AuthcacheP13nFragmentLoader interface. If not given, the 'fragment' instance is used if it implements the interface mentioned before.
  • fragment access: (Optional) The name of a class used to check access to the data. The class must implement the AuthcacheP13nFragmentAccess interface. If not given, the 'fragment' instance is used if it implements the interface mentioned before.
  • cache maxage: (Optional) The number of seconds a rendered fragment should be cacheable in the users browser or in intermediate cache servers.
  • cache granularity (Optional) A bitmask describing the criteria used to distinguish between multiple variants of a fragment. A combination of the following contstants can be used:

  • bootstrap phase: (Optional) The minimal bootstrap phase necessary to render the fragment. One of the DRUPAL_BOOTSTRAP_X constants.
11 functions implement hook_authcache_p13n_fragment()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

authcache_ajax_test_authcache_p13n_fragment in modules/authcache_ajax/tests/authcache_ajax_test.module
Implements hook_authcache_p13n_fragment().
authcache_block_authcache_p13n_fragment in modules/authcache_block/authcache_block.module
Implements hook_authcache_p13n_fragment().
authcache_esi_test_authcache_p13n_fragment in modules/authcache_esi/tests/authcache_esi_test.module
Implements hook_authcache_p13n_fragment().
authcache_form_authcache_p13n_fragment in modules/authcache_form/authcache_form.module
Implements hook_authcache_p13n_fragment().
authcache_menu_authcache_p13n_fragment in modules/authcache_menu/authcache_menu.module
Implements hook_authcache_p13n_fragment().

... See full list

1 invocation of hook_authcache_p13n_fragment()
authcache_p13n_fragment_info in modules/authcache_p13n/authcache_p13n.module
Return information about fragments implemented by other modules.

File

modules/authcache_p13n/authcache_p13n.api.php, line 38
Documentation for hooks provided by the authcache personalization module.

Code

function hook_authcache_p13n_fragment() {
  return array(
    'form-token' => array(
      'fragment' => array(
        '#class' => 'AuthcacheFormTokenFragment',
      ),
    ),
  );
}