public function sort($fieldName, $order = null) { $fields = is_array($fieldName) ? $fieldName : [$fieldName => $order]; return parent::sort($this->getDocumentPersister()->prepareSortOrProjection($fields)); }