yii\data\ArrayDataProvider::sortModels PHP 메소드

sortModels() 보호된 메소드

Sorts the data models according to the given sort definition
protected sortModels ( array $models, Sort $sort ) : array
$models array the models to be sorted
$sort Sort the sort definition
리턴 array the sorted data models
    protected function sortModels($models, $sort)
    {
        $orders = $sort->getOrders();
        if (!empty($orders)) {
            ArrayHelper::multisort($models, array_keys($orders), array_values($orders));
        }
        return $models;
    }