public function byFieldValue(
        string $field,
        string $order
    ): SortBy {
        $this->sortsBy[] = [
            'type' => self::TYPE_FIELD,
            'field' => Item::getPathByField($field),
            'order' => $order,
        ];

        return $this;
    }
public function byFieldValue(
        string $field,
        string $order
    ): SortBy {
        $this->sortsBy[] = [
            'type' => self::TYPE_FIELD,
            'field' => Item::getPathByField($field),
            'order' => $order,
        ];

        return $this;
    }
public function byFieldValue ( string $ field , string $ order ) : SortBy { $ this -> sortsBy [ ] = [ 'type' => self :: TYPE_FIELD , 'field' => Item :: getPathByField ( $ field ) , 'order' => $ order , ] ; return $ this ; }
Sort by field.

@param string $field
@param string $order

@return SortBy
Sort by field .