mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-22 21:22:48 +00:00
Refactor PersonIdentifierDefinition
: Replace fully qualified \Doctrine\DBAL\Types\Types
references with simplified Types
aliases.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\PersonBundle\Entity\Identifier;
|
||||
|
||||
enum IdentifierPresenceEnum: string
|
||||
{
|
||||
/**
|
||||
* The person identifier is not editable by any user.
|
||||
*
|
||||
* The identifier is intended to be added by an import script, for instance.
|
||||
*/
|
||||
case NOT_EDITABLE = 'NOT_EDITABLE';
|
||||
|
||||
/**
|
||||
* The person identifier is present on the edit form only.
|
||||
*/
|
||||
case ON_EDIT = 'ON_EDIT';
|
||||
|
||||
/**
|
||||
* The person identifier is present on both person's creation form, and edit form.
|
||||
*/
|
||||
case ON_CREATION = 'ON_CREATION';
|
||||
|
||||
/**
|
||||
* The person identifier is required to create the person. It should not be empty.
|
||||
*/
|
||||
case REQUIRED = 'REQUIRED';
|
||||
|
||||
public function isEditableByUser(): bool
|
||||
{
|
||||
return IdentifierPresenceEnum::NOT_EDITABLE !== $this;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user