protected function getOrderingsByField(string $field, array $values, string $order = QueryInterface::ORDER_DESCENDING): array {
    $orderings = [];

    if (!empty($values)) {
      foreach ($values as $value) {
        $orderings["$field={$value}"] = $order;
      }
    }

    return $orderings;
  }
protected function getOrderingsByField(string $field, array $values, string $order = QueryInterface::ORDER_DESCENDING): array {
    $orderings = [];

    if (!empty($values)) {
      foreach ($values as $value) {
        $orderings["$field={$value}"] = $order;
      }
    }

    return $orderings;
  }
protected function getOrderingsByField ( string $ field , array $ values , string $ order = QueryInterface :: ORDER_DESCENDING ) : array { $ orderings = [ ] ; if ( ! empty ( $ values ) ) { foreach ( $ values as $ value ) { $ orderings [ "$field={$value}" ] = $ order ; } } return $ orderings ; }
Gets the orderings by a field.

@param string $field The field
@param array $values The values
@param string $order The optional order, defaults to `QueryInterface::ORDER_DESCENDING`
@return array The orderings
Gets the orderings by a field .