Add Person's external identifiers to creation and edit form

This commit is contained in:
2025-12-05 17:02:26 +00:00
parent d21d03d407
commit 6d93b2b1b6
131 changed files with 9015 additions and 4954 deletions

View File

@@ -15,7 +15,7 @@ use Chill\PersonBundle\Entity\Identifier\PersonIdentifier;
use Chill\PersonBundle\Entity\Identifier\PersonIdentifierDefinition;
use Symfony\Component\Form\FormBuilderInterface;
final readonly class PersonIdentifierWorker
readonly class PersonIdentifierWorker
{
public function __construct(
private PersonIdentifierEngineInterface $identifierEngine,
@@ -46,4 +46,25 @@ final readonly class PersonIdentifierWorker
{
return $this->identifierEngine->renderAsString($identifier, $this->definition);
}
/**
* Return true if the identifier must be considered as empty.
*/
public function isEmpty(PersonIdentifier $identifier): bool
{
return $this->identifierEngine->isEmpty($identifier);
}
/**
* @return list<IdentifierViolationDTO>
*/
public function validate(PersonIdentifier $identifier, PersonIdentifierDefinition $definition): array
{
return $this->identifierEngine->validate($identifier, $definition);
}
public function getDefaultValue(): array
{
return $this->identifierEngine->getDefaultValue($this->definition);
}
}