Skip to content

Instantly share code, notes, and snippets.

Created March 19, 2015 12:19
Show Gist options
  • Save anonymous/b0f066bef01968cdc074 to your computer and use it in GitHub Desktop.
Save anonymous/b0f066bef01968cdc074 to your computer and use it in GitHub Desktop.
/** Get all projects */
$projects = $this->nodeSearchService->findByProperties('', array('Test.Site:Project'), $this->context);
/** Sort projects */
foreach ($projects as $key => $project) {
$status[$key] = $project->getProperty('status');
$id[$key] = $project->getProperty('id');
}
array_multisort($status, SORT_DESC, $id, SORT_ASC, $projects);
Copy link

ghost commented Mar 19, 2015

foreach ($projects as $key => $project) {
$property[$key] = $project->getProperty('status');
}
array_multisort($property, SORT_DESC);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment