Skip to content

Commit b7df200

Browse files
authored
Add Classification Store service. (#30)
* Add Classification Store ServiceResolver. * Add Classification Store ServiceResolver. * Code Style. * Remove static. * Interface should not be internal.
1 parent 06373f7 commit b7df200

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
/**
5+
* Pimcore
6+
*
7+
* This source file is available under two different licenses:
8+
* - GNU General Public License version 3 (GPLv3)
9+
* - Pimcore Commercial License (PCL)
10+
* Full copyright and license information is available in
11+
* LICENSE.md which is distributed with this source code.
12+
*
13+
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
14+
* @license http://www.pimcore.org/license GPLv3 and PCL
15+
*/
16+
17+
namespace Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ClassificationStore;
18+
19+
use Exception;
20+
use Pimcore\Model\DataObject\ClassDefinition\Data;
21+
use Pimcore\Model\DataObject\ClassDefinition\Data\EncryptedField;
22+
use Pimcore\Model\DataObject\Classificationstore\KeyConfig;
23+
use Pimcore\Model\DataObject\Classificationstore\KeyGroupRelation;
24+
use Pimcore\Model\DataObject\Classificationstore\Service;
25+
26+
/**
27+
* @internal
28+
*/
29+
final class ServiceResolver implements ServiceResolverInterface
30+
{
31+
/**
32+
* @throws Exception
33+
*/
34+
public function getFieldDefinitionFromKeyConfig(
35+
KeyConfig|KeyGroupRelation $keyConfig
36+
): EncryptedField|Data|null
37+
{
38+
return Service::getFieldDefinitionFromKeyConfig($keyConfig);
39+
}
40+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
/**
5+
* Pimcore
6+
*
7+
* This source file is available under two different licenses:
8+
* - GNU General Public License version 3 (GPLv3)
9+
* - Pimcore Commercial License (PCL)
10+
* Full copyright and license information is available in
11+
* LICENSE.md which is distributed with this source code.
12+
*
13+
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
14+
* @license http://www.pimcore.org/license GPLv3 and PCL
15+
*/
16+
17+
18+
namespace Pimcore\Bundle\StaticResolverBundle\Models\DataObject\ClassificationStore;
19+
20+
use Pimcore\Model\DataObject\ClassDefinition\Data\EncryptedField;
21+
use Pimcore\Model\DataObject\ClassDefinition\Data;
22+
use Pimcore\Model\DataObject\Classificationstore\KeyConfig;
23+
use Pimcore\Model\DataObject\Classificationstore\KeyGroupRelation;
24+
25+
interface ServiceResolverInterface
26+
{
27+
public function getFieldDefinitionFromKeyConfig(
28+
KeyConfig|KeyGroupRelation $keyConfig
29+
): EncryptedField|Data|null;
30+
}

0 commit comments

Comments
 (0)