File tree Expand file tree Collapse file tree 2 files changed +62
-0
lines changed Expand file tree Collapse file tree 2 files changed +62
-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 \Models \RecycleBin ;
15+
16+ use Pimcore \Model \Element \ElementInterface ;
17+ use Pimcore \Model \Element \Recyclebin \Item ;
18+ use Pimcore \Model \User ;
19+
20+ /**
21+ * @internal
22+ */
23+ final class ItemResolver implements ItemResolverInterface
24+ {
25+ public function create (ElementInterface $ element , ?User $ user = null ): void
26+ {
27+ Item::create ($ element , $ user );
28+ }
29+
30+ public function getById (int $ id ): ?Item
31+ {
32+ return Item::getById ($ id );
33+ }
34+ }
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 \Models \RecycleBin ;
15+
16+ use Pimcore \Model \Element \ElementInterface ;
17+ use Pimcore \Model \Element \Recyclebin \Item ;
18+ use Pimcore \Model \User ;
19+
20+ /**
21+ * @internal
22+ */
23+ interface ItemResolverInterface
24+ {
25+ public function create (ElementInterface $ element , ?User $ user = null ): void ;
26+
27+ public function getById (int $ id ): ?Item ;
28+ }
You can’t perform that action at this time.
0 commit comments