private function sortConstants(ConstantsInterface $model)
{
if ($this->config->isSortingEnabled() && ($constantSorting = $this->config->getConstantSorting()) !== false) {
if (is_string($constantSorting)) {
$constantSorting = ComparatorFactory::createConstantComparator($constantSorting);
}
$model->getConstants()->sort($constantSorting);
}
}