-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrimaryKeyHandler.php
More file actions
39 lines (31 loc) · 910 Bytes
/
PrimaryKeyHandler.php
File metadata and controls
39 lines (31 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
declare(strict_types=1);
namespace Tmi\TranslationBundle\Translation\Handlers;
use Tmi\TranslationBundle\Translation\Args\TranslationArgs;
use Tmi\TranslationBundle\Utils\AttributeHelper;
/**
* Handles translation of primary keys.
*/
final readonly class PrimaryKeyHandler implements TranslationHandlerInterface
{
public function __construct(
private AttributeHelper $attributeHelper,
) {
}
public function supports(TranslationArgs $args): bool
{
return null !== $args->getProperty() && $this->attributeHelper->isId($args->getProperty());
}
public function handleSharedAmongstTranslations(TranslationArgs $args): null
{
return null;
}
public function handleEmptyOnTranslate(TranslationArgs $args): null
{
return null;
}
public function translate(TranslationArgs $args): null
{
return null;
}
}