From e1e76e1bd842a0609fdcaf0a55c521db11f50a16 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Fri, 9 Aug 2024 12:52:38 +0200 Subject: [PATCH] Add interface for ContentRichEntityRepository --- .../ContentRichEntityRepositoryInterface.php | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Content/Domain/Repository/ContentRichEntityRepositoryInterface.php diff --git a/Content/Domain/Repository/ContentRichEntityRepositoryInterface.php b/Content/Domain/Repository/ContentRichEntityRepositoryInterface.php new file mode 100644 index 00000000..805c317d --- /dev/null +++ b/Content/Domain/Repository/ContentRichEntityRepositoryInterface.php @@ -0,0 +1,84 @@ +, + * locale?: string|null, + * stage?: string|null, + * categoryIds?: int[], + * categoryKeys?: string[], + * categoryOperator?: 'AND'|'OR', + * tagIds?: int[], + * tagNames?: string[], + * tagOperator?: 'AND'|'OR', + * templateKeys?: string[], + * loadGhost?: bool, + * } + * + * @phpstan-type ContentRichEntityRepositorySortBys array{ + * ids: array, + * locale?: string|null, + * stage?: string|null, + * categoryIds?: int[], + * categoryKeys?: string[], + * categoryOperator?: 'AND'|'OR', + * tagIds?: int[], + * tagNames?: string[], + * tagOperator?: 'AND'|'OR', + * templateKeys?: string[], + * loadGhost?: bool, + * } + * + * @phpstan-type ContentRichEntityRepositorySelects array{ + * content_admin?: bool, + * content_website?: bool, + * with-excerpt-tags?: bool, + * with-excerpt-categories?: bool, + * with-excerpt-categories-translation?: bool, + * with-excerpt-image?: bool, + * with-excerpt-image-translation?: bool, + * with-excerpt-icon?: bool, + * with-excerpt-icon-translation?: bool, + * } + */ +interface ContentRichEntityRepositoryInterface +{ + /** + * @param ContentRichEntityRepositoryFilters $filters + * + * @param ContentRichEntityRepositorySortBys $sortBys + * + * @param ContentRichEntityRepositorySelects $selects + * + * @return iterable + */ + public function findBy( + array $filters = [], + array $sortBys = [], + array $selects = [], + ): iterable; + + /** + * @param ContentRichEntityRepositoryFilters $filters + */ + public function countBy( + array $filters = [], + ): int; +}