You are here

public static function AuthcacheP13nObjectResourcePreprocessor::processCollection in Authenticated User Page Caching (Authcache) 7.2

Detect a collection resource and add defaults.

File

modules/authcache_p13n/includes/AuthcacheP13nObjectResourcePreprocessor.inc, line 125
Defines the class AuthcacheP13nObjectResourcePreprocessor.

Class

AuthcacheP13nObjectResourcePreprocessor
A utility class suitable for preparing resources for the object factory.

Code

public static function processCollection($resource) {
  if (is_array($resource) && isset($resource['#collection'])) {
    return $resource + array(
      '#type' => 'collection',
    );
  }
}