You are here

public function AuthcacheP13nObjectFactory::collectMembers in Authenticated User Page Caching (Authcache) 7.2

Collect all resources in a collection and return an ordered array.

1 call to AuthcacheP13nObjectFactory::collectMembers()
AuthcacheP13nObjectFactory::get in modules/authcache_p13n/includes/AuthcacheP13nObjectFactory.inc
Return the value or instance for the given resource.

File

modules/authcache_p13n/includes/AuthcacheP13nObjectFactory.inc, line 240
Defines the class AuthcacheP13nObjectFactory.

Class

AuthcacheP13nObjectFactory
A utility class helping with dependency injection.

Code

public function collectMembers($collection_name) {

  // Necessary until #1272900 lands
  // @ignore style_function_spacing
  $result = array_filter($this->resources, function ($definition) use ($collection_name) {
    return isset($definition['#member_of']) && $definition['#member_of'] === $collection_name;
  });
  uasort($result, 'element_sort');
  return $result;
}