public static function order($items) {
		if (empty($items)) {
			return array();
		}

		$_items = array_combine(array_keys($items), Hash::extract($items, '{s}.weight'));
		asort($_items);

		foreach (array_keys($_items) as $key) {
			$_items[$key] = $items[$key];
		}

		return $items;
	}
public static function order($items) {
		if (empty($items)) {
			return array();
		}

		$_items = array_combine(array_keys($items), Hash::extract($items, '{s}.weight'));
		asort($_items);

		foreach (array_keys($_items) as $key) {
			$_items[$key] = $items[$key];
		}

		return $items;
	}
public static function order ( $ items ) { if ( empty ( $ items ) ) { return array ( ) ; } $ _items = array_combine ( array_keys ( $ items ) , Hash :: extract ( $ items , '{s}.weight' ) ) ; asort ( $ _items ) ; foreach ( array_keys ( $ _items ) as $ key ) { $ _items [ $ key ] = $ items [ $ key ] ; } return $ items ; }
Orders items by weight.

@param array $items
@return array
Orders items by weight .