-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add interface for ContentRichEntityRepository
- Loading branch information
1 parent
f36e36d
commit b4cc47b
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
Content/Domain/Repository/ContentRichEntityRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of Sulu. | ||
* | ||
* (c) Sulu GmbH | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Sulu\Bundle\ContentBundle\Content\Domain\Repository; | ||
|
||
use Sulu\Bundle\ContentBundle\Content\Domain\Model\ContentRichEntityInterface; | ||
|
||
/** | ||
* @template T of ContentRichEntityInterface | ||
* | ||
* @phpstan-type ContentRichEntityRepositoryFilters array{ | ||
* identifiers?: array<string>, | ||
* 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{ | ||
* title?: 'asc'|'desc', | ||
* authored?: 'asc'|'desc', | ||
* workflowPublished?: 'asc'|'desc', | ||
* } | ||
* @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<T> | ||
*/ | ||
public function findBy( | ||
array $filters = [], | ||
array $sortBys = [], | ||
array $selects = [], | ||
): iterable; | ||
|
||
/** | ||
* @param ContentRichEntityRepositoryFilters $filters | ||
*/ | ||
public function countBy( | ||
array $filters = [], | ||
): int; | ||
} |