public function AuthcacheViewsFragment::load in Authenticated User Page Caching (Authcache) 7.2
Load the objects designated by the given list of keys.
Parameters
array $keys: A list of strings representing the keys of the fragment(s) to load.
array $context: Additional run-time per-request context (key-value pairs).
Return value
array An associative array of key-value pairs where keys correspond to the input keys and the values to the objects loaded from the database.
Throws
Overrides AuthcacheP13nFragmentLoaderInterface::load
File
- modules/
authcache_views/ includes/ AuthcacheViewsFragment.inc, line 30 - Defines personalization fragment for views
Class
- AuthcacheViewsFragment
- Personalization fragment for rendered views.
Code
public function load($params, $context) {
$view = views_get_view($this->viewName);
if (!$view) {
throw new AuthcacheP13nRequestNotFound();
}
if (!$view
->set_display($this->displayName)) {
throw new AuthcacheP13nRequestNotFound();
}
if (!empty($context['views arguments'])) {
$view
->set_arguments($context['views arguments']);
}
return array(
$this->viewName => $view,
);
}