public function getLoadedFiles($type, $location)
{
if (isset($GLOBALS['_ELGG']->externals) && isset($GLOBALS['_ELGG']->externals[$type]) && $GLOBALS['_ELGG']->externals[$type] instanceof \ElggPriorityList) {
$items = $GLOBALS['_ELGG']->externals[$type]->getElements();
$items = array_filter($items, function ($v) use($location) {
return $v->loaded == true && $v->location == $location;
});
if ($items) {
array_walk($items, function (&$v, $k) {
$v = $v->url;
});
}
return $items;
}
return array();
}