diff --git a/src/Datagrid/ProxyQueryInterface.php b/src/Datagrid/ProxyQueryInterface.php index eca46f5107..d4f01e2988 100644 --- a/src/Datagrid/ProxyQueryInterface.php +++ b/src/Datagrid/ProxyQueryInterface.php @@ -40,11 +40,11 @@ public function execute(array $params = [], ?int $hydrationMode = null); */ public function setSortBy(array $parentAssociationMappings, array $fieldMapping): self; - public function getSortBy(): string; + public function getSortBy(): ?string; public function setSortOrder(string $sortOrder): self; - public function getSortOrder(): string; + public function getSortOrder(): ?string; /** * @return mixed @@ -62,6 +62,8 @@ public function getMaxResults(): ?int; public function getUniqueParameterId(): int; /** + * Join entities from the given association mappings and return the last alias created. + * * @param mixed[] $associationMappings */ public function entityJoin(array $associationMappings): string; diff --git a/tests/App/Datagrid/ProxyQuery.php b/tests/App/Datagrid/ProxyQuery.php index 09b08df667..94cb0abf22 100644 --- a/tests/App/Datagrid/ProxyQuery.php +++ b/tests/App/Datagrid/ProxyQuery.php @@ -31,7 +31,7 @@ public function setSortBy(array $parentAssociationMappings, array $fieldMapping) throw new \BadMethodCallException('Not implemented.'); } - public function getSortBy(): string + public function getSortBy(): ?string { return 'e.id'; } @@ -41,7 +41,7 @@ public function setSortOrder(string $sortOrder): ProxyQueryInterface throw new \BadMethodCallException('Not implemented.'); } - public function getSortOrder(): string + public function getSortOrder(): ?string { return 'ASC'; }