mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-21 12:42:51 +00:00
43 lines
1013 B
PHP
43 lines
1013 B
PHP
<?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;
|
|
}
|
|
}
|