You are here

function styles_uasort in Styles 6

Same name and namespace in other branches
  1. 7 styles.module \styles_uasort()

Sort the containers array by weight and label. Use like usort($containers, 'styles_usort');

1 string reference to 'styles_uasort'
styles_containers in ./styles.module
Get an array of all defined style containers.

File

./styles.module, line 99
Bundles similar display formatters together.

Code

function styles_uasort($a, $b) {
  $retval = $a['weight'] - $b['weight'];
  if (!$retval) {
    return strnatcasecmp($a['label'], $b['label']);
  }
  return $retval;
}