instanceIDs, [$this, 'sortHelper']); return $this; } /** * {@inheritdoc} */ public function sortHelper($aID, $bID) { $a_weight = $this->get($aID)->getWeight(); $b_weight = $this->get($bID)->getWeight(); if ($a_weight == $b_weight) { return strcmp($aID, $bID); } return ($a_weight < $b_weight) ? -1 : 1; } }