function hook_authcache_p13n_setting in Authenticated User Page Caching (Authcache) 7.2
Declare settings containing personalized information.
Return an associative array where the key represents the setting id and the value an array with the following keys:
- setting': The name of the class used to build the markup. The class must implement the AuthcacheP13nSetting interface.
- setting validator: (Optional) The name of the class used to validate the parameters for the setting renderer. The class must implement the AuthcacheP13nSettingValidator interface. If not given, the 'setting' instance is used if it implements the interface mentioned before.
- setting loader: (Optional) The name of the class used to load the necessary data. The class must implement the AuthcacheP13nSettingLoader interface. If not given, the 'setting' instance is used if it implements the interface mentioned before.
- setting access: (Optional) The name of a class used to check access to the data. The class must implement the AuthcacheP13nSettingAccess interface. If not given, the 'setting' instance is used if it implements the interface mentioned before.
- cache maxage: (Optional) The number of seconds a rendered setting 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 setting. A combination of the
following contstants can be used:
- AuthcacheP13nCacheGranularity::PER_USER: Content is different for each session.
- AuthcacheP13nCacheGranularity::PER_PAGE: Content changes when setting is rendered on different pages.
- bootstrap phase: (Optional) The minimal bootstrap phase necessary to render the setting. One of the DRUPAL_BOOTSTRAP_X constants.
9 functions implement hook_authcache_p13n_setting()
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_setting in modules/
authcache_ajax/ tests/ authcache_ajax_test.module - Implements hook_authcache_p13n_setting().
- authcache_comment_authcache_p13n_setting in modules/
authcache_comment/ authcache_comment.module - Implements hook_authcache_p13n_setting().
- authcache_esi_test_authcache_p13n_setting in modules/
authcache_esi/ tests/ authcache_esi_test.module - Implements hook_authcache_p13n_setting().
- authcache_forum_authcache_p13n_setting in modules/
authcache_forum/ authcache_forum.module - Implements hook_authcache_p13n_setting().
- authcache_node_history_authcache_p13n_setting in modules/
authcache_node_history/ authcache_node_history.module - Implements hook_authcache_p13n_setting().
1 invocation of hook_authcache_p13n_setting()
- authcache_p13n_setting_info in modules/
authcache_p13n/ authcache_p13n.module - Return information about settings implemented by other modules.
File
- modules/
authcache_p13n/ authcache_p13n.api.php, line 168 - Documentation for hooks provided by the authcache personalization module.
Code
function hook_authcache_p13n_setting() {
return array(
'authcache-contact' => array(
'setting' => array(
'#class' => 'AuthcacheContactSetting',
),
'setting target' => 'authcacheContact',
'cache maxage' => 86400,
),
);
}