public static function byFieldsValues(array $shortSortByElements): SortBy
    {
        $sortBy = self::create();
        foreach ($shortSortByElements as $field => $order) {
            $sortBy->byFieldValue($field, $order);
        }

        return $sortBy;
    }
public static function byFieldsValues(array $shortSortByElements): SortBy
    {
        $sortBy = self::create();
        foreach ($shortSortByElements as $field => $order) {
            $sortBy->byFieldValue($field, $order);
        }

        return $sortBy;
    }
public static function byFieldsValues ( array $ shortSortByElements ) : SortBy { $ sortBy = self :: create ( ) ; foreach ( $ shortSortByElements as $ field => $ order ) { $ sortBy -> byFieldValue ( $ field , $ order ) ; } return $ sortBy ; }
Create sort by with passed simple fields and values.

SortBy::byFieldsValues([
['brand' => 'asc'],
['category' => 'desc'],
]);

@param array $shortSortByElements

@return SortBy
Create sort by with passed simple fields and values .