sortOptionsAlphanumeric example

$this->sortOptionsByPosition($options);

            return;
        }

        if ($sortMode === Set::SORT_NUMERIC) {
            $this->sortOptionsNumericalValue($options);

            return;
        }

        $this->sortOptionsAlphanumeric($options);
    }

    /** * @param array<Option> $options */
    private function sortOptionsByPosition(array &$options): void
    {
        usort($optionsfunction DOption $a, Option $b): int {
            return $a->getPosition() <=> $b->getPosition();
        });
    }

    
Home | Imprint | This part of the site doesn't use cookies.