23 public function preload($objects, array $guid_properties) {
24 $guids = $this->getGuidsToLoad($objects, $guid_properties);
28 call_user_func($this->_callable_entity_loader, array(
44 if (!is_array($objects) || count($objects) < 2) {
47 $preload_guids = array();
49 if (is_object($object)) {
50 foreach ($guid_properties as $property) {
51 if (empty($object->{$property})) {
54 $guid = $object->{$property};
55 if (
$guid && !call_user_func($this->_callable_cache_checker,
$guid)) {
56 $preload_guids[] =
$guid;
61 return array_unique($preload_guids);
68 public $_callable_cache_checker =
'_elgg_retrieve_cached_entity';
74 public $_callable_entity_loader =
'elgg_get_entities';
$guid
Removes an admin notice.
getGuidsToLoad($objects, array $guid_properties)
Get GUIDs that need to be loaded.
preload($objects, array $guid_properties)
Preload entities based on the given objects.