Creates a comparator for properties
public static createPropertyComparator ( string $type ) : phootwork\lang\Comparator | ||
$type | string | |
return | phootwork\lang\Comparator |
private function sortProperties(PropertiesInterface $model) { if ($this->config->isSortingEnabled() && ($propertySorting = $this->config->getPropertySorting()) !== false) { if (is_string($propertySorting)) { $propertySorting = ComparatorFactory::createPropertyComparator($propertySorting); } $model->getProperties()->sort($propertySorting); } }