You are here

function authcache_flag_authcache_p13n_assembly in Authenticated User Page Caching (Authcache) 7.2

Implements hook_authcache_p13n_assembly().

File

modules/authcache_flag/authcache_flag.module, line 10
Provide personalization for the flag module.

Code

function authcache_flag_authcache_p13n_assembly() {
  $assembly = array(
    'admin name' => t('All flags'),
    'admin group' => t('Flag'),
    'admin description' => t('All flags on a page'),
    'cache maxage' => 600,
    'bootstrap phase' => DRUPAL_BOOTSTRAP_FULL,
  );
  $flags = flag_get_flags();
  foreach ($flags as $flag) {
    $partial_id = _authcache_flag_partial_id($flag);
    $assembly['fragment ' . $partial_id] = array(
      '#partial' => $partial_id,
      '#class' => 'AuthcacheFlagFlagFragment',
      '#arguments' => array(
        $flag->name,
      ),
    );
  }
  return array(
    'flags' => $assembly,
  );
}