-
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 e1e76e1
Showing
1 changed file
with
84 additions
and
0 deletions.
There are no files selected for viewing
84 changes: 84 additions & 0 deletions
84
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,84 @@ | ||
<?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{ | ||
* ids: 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{ | ||
* ids: 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 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 = [], | ||
Check failure on line 73 in Content/Domain/Repository/ContentRichEntityRepositoryInterface.php GitHub Actions / PHP Lint
|
||
array $sortBys = [], | ||
Check failure on line 74 in Content/Domain/Repository/ContentRichEntityRepositoryInterface.php GitHub Actions / PHP Lint
|
||
array $selects = [], | ||
): iterable; | ||
|
||
/** | ||
* @param ContentRichEntityRepositoryFilters $filters | ||
*/ | ||
public function countBy( | ||
array $filters = [], | ||
Check failure on line 82 in Content/Domain/Repository/ContentRichEntityRepositoryInterface.php GitHub Actions / PHP Lint
|
||
): int; | ||
} |