WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit d22638b

Browse files
Add interface for ContentRichEntityRepository
1 parent f36e36d commit d22638b

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/*
6+
* This file is part of Sulu.
7+
*
8+
* (c) Sulu GmbH
9+
*
10+
* This source file is subject to the MIT license that is bundled
11+
* with this source code in the file LICENSE.
12+
*/
13+
14+
namespace Sulu\Bundle\ContentBundle\Content\Domain\Repository;
15+
16+
use Sulu\Bundle\ContentBundle\Content\Domain\Model\ContentRichEntityInterface;
17+
18+
/**
19+
* @template T of ContentRichEntityInterface
20+
*
21+
* @phpstan-type ContentRichEntityRepositoryFilters array{
22+
* identifiers?: array<string>,
23+
* locale?: string|null,
24+
* stage?: string|null,
25+
* categoryIds?: int[],
26+
* categoryKeys?: string[],
27+
* categoryOperator?: 'AND'|'OR',
28+
* tagIds?: int[],
29+
* tagNames?: string[],
30+
* tagOperator?: 'AND'|'OR',
31+
* templateKeys?: string[],
32+
* loadGhost?: bool,
33+
* }
34+
*
35+
* @phpstan-type ContentRichEntityRepositorySortBys array{
36+
* title?: 'asc'|'desc',
37+
* authored?: 'asc'|'desc',
38+
* workflowPublished?: 'asc'|'desc',
39+
* }
40+
*
41+
* @phpstan-type ContentRichEntityRepositorySelects array{
42+
* content_admin?: bool,
43+
* content_website?: bool,
44+
* with-excerpt-tags?: bool,
45+
* with-excerpt-categories?: bool,
46+
* with-excerpt-categories-translation?: bool,
47+
* with-excerpt-image?: bool,
48+
* with-excerpt-image-translation?: bool,
49+
* with-excerpt-icon?: bool,
50+
* with-excerpt-icon-translation?: bool,
51+
* }
52+
*/
53+
interface ContentRichEntityRepositoryInterface
54+
{
55+
/**
56+
* @param ContentRichEntityRepositoryFilters $filters
57+
*
58+
* @param ContentRichEntityRepositorySortBys $sortBys
59+
*
60+
* @param ContentRichEntityRepositorySelects $selects
61+
*
62+
* @return iterable<T>
63+
*/
64+
public function findBy(
65+
array $filters = [],
66+
array $sortBys = [],
67+
array $selects = [],
68+
): iterable;
69+
70+
/**
71+
* @param ContentRichEntityRepositoryFilters $filters
72+
*/
73+
public function countBy(
74+
array $filters = [],
75+
): int;
76+
}

0 commit comments

Comments
 (0)