protected static function FormStep::sortStep in Simple multi step form 8
Same name and namespace in other branches
- 8.x src/FormStep.php \Drupal\simple_multistep\FormStep::sortStep()
Sort array by object property.
Parameters
object $first_object: First object.
object $second_object: Second object.
Return value
int Indicator.
File
- src/
FormStep.php, line 146
Class
- FormStep
- Class FormStep.
Namespace
Drupal\simple_multistepCode
protected static function sortStep($first_object, $second_object) {
if ($first_object->weight == $second_object->weight) {
return 0;
}
return $first_object->weight < $second_object->weight ? -1 : 1;
}