File tree Expand file tree Collapse file tree 4 files changed +128
-0
lines changed
Expand file tree Collapse file tree 4 files changed +128
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ declare (strict_types=1 );
3+
4+ /**
5+ * This source file is available under the terms of the
6+ * Pimcore Open Core License (POCL)
7+ * Full copyright and license information is available in
8+ * LICENSE.md which is distributed with this source code.
9+ *
10+ * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
11+ * @license Pimcore Open Core License (POCL)
12+ */
13+
14+ namespace Pimcore \Bundle \StaticResolverBundle \Contract \Lib \Tools ;
15+
16+ use Pimcore \Model \Document ;
17+ use Pimcore \Model \Site ;
18+ use Pimcore \Tool \Frontend ;
19+
20+ class FrontendResolverContract implements FrontendResolverContractInterface
21+ {
22+ public function isDocumentInSite (?Site $ site , Document $ document ): bool
23+ {
24+ return Frontend::isDocumentInSite ($ site , $ document );
25+ }
26+
27+ public function isDocumentInCurrentSite (Document $ document ): bool
28+ {
29+ return Frontend::isDocumentInCurrentSite ($ document );
30+ }
31+
32+ public function getSiteForDocument (Document $ document ): ?Site
33+ {
34+ return Frontend::getSiteForDocument ($ document );
35+ }
36+
37+ public function getSiteIdForDocument (Document $ document ): ?int
38+ {
39+ return Frontend::getSiteIdForDocument ($ document );
40+ }
41+
42+ /**
43+ * @return false|array{enabled: true, lifetime: int|null}
44+ */
45+ public function isOutputCacheEnabled (): bool |array
46+ {
47+ return Frontend::isOutputCacheEnabled ();
48+ }
49+ }
Original file line number Diff line number Diff line change 1+ <?php
2+ declare (strict_types=1 );
3+
4+ /**
5+ * This source file is available under the terms of the
6+ * Pimcore Open Core License (POCL)
7+ * Full copyright and license information is available in
8+ * LICENSE.md which is distributed with this source code.
9+ *
10+ * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
11+ * @license Pimcore Open Core License (POCL)
12+ */
13+
14+ namespace Pimcore \Bundle \StaticResolverBundle \Contract \Lib \Tools ;
15+
16+ use Pimcore \Model \Document ;
17+ use Pimcore \Model \Site ;
18+
19+ interface FrontendResolverContractInterface
20+ {
21+ public function isDocumentInSite (?Site $ site , Document $ document ): bool ;
22+
23+ public function isDocumentInCurrentSite (Document $ document ): bool ;
24+
25+ public function getSiteForDocument (Document $ document ): ?Site ;
26+
27+ public function getSiteIdForDocument (Document $ document ): ?int ;
28+
29+ /**
30+ * @return false|array{enabled: true, lifetime: int|null}
31+ */
32+ public function isOutputCacheEnabled (): bool |array ;
33+ }
Original file line number Diff line number Diff line change 1+ <?php
2+ declare (strict_types=1 );
3+
4+ /**
5+ * This source file is available under the terms of the
6+ * Pimcore Open Core License (POCL)
7+ * Full copyright and license information is available in
8+ * LICENSE.md which is distributed with this source code.
9+ *
10+ * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
11+ * @license Pimcore Open Core License (POCL)
12+ */
13+
14+ namespace Pimcore \Bundle \StaticResolverBundle \Lib \Tools ;
15+
16+ use Pimcore \Bundle \StaticResolverBundle \Contract \Lib \Tools \FrontendResolverContract ;
17+
18+ /**
19+ * @internal
20+ */
21+ final class FrontendResolver extends FrontendResolverContract implements FrontendResolverInterface
22+ {
23+ }
Original file line number Diff line number Diff line change 1+ <?php
2+ declare (strict_types=1 );
3+
4+ /**
5+ * This source file is available under the terms of the
6+ * Pimcore Open Core License (POCL)
7+ * Full copyright and license information is available in
8+ * LICENSE.md which is distributed with this source code.
9+ *
10+ * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
11+ * @license Pimcore Open Core License (POCL)
12+ */
13+
14+ namespace Pimcore \Bundle \StaticResolverBundle \Lib \Tools ;
15+
16+ use Pimcore \Bundle \StaticResolverBundle \Contract \Lib \Tools \FrontendResolverContractInterface ;
17+
18+ /**
19+ * @internal
20+ */
21+ interface FrontendResolverInterface extends FrontendResolverContractInterface
22+ {
23+ }
You can’t perform that action at this time.
0 commit comments