Skip to content

Instantly share code, notes, and snippets.

@lthurston
Created December 23, 2010 18:55
Show Gist options
  • Save lthurston/753384 to your computer and use it in GitHub Desktop.
Save lthurston/753384 to your computer and use it in GitHub Desktop.
// Sort the resources
$sortedResources = array();
$resourceUidsArray = t3lib_div::trimExplode(',',$resourceUids);
foreach($resourceUidsArray as $uid) {
foreach($resources as $resource) {
if($resource->getUid() == $uid) {
$sortedResources[] = $resource;
break;
}
}
}
$this->resources = $sortedResources;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment