. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Elements; use Fisharebest\Webtrees\I18N; use function strtoupper; /** * CHILD_LINKAGE_STATUS := {Size=1:15} * [challenged | disproven | proven] * A status code that allows passing on the users opinion of the status of a * child to family link. * challenged = Linking this child to this family is suspect, but the linkage * has been neither proven nor disproven. * disproven = There has been a claim by some that this child belongs to this * family, but the linkage has been disproven. * proven = There has been a claim by some that this child does not belongs * to this family, but the linkage has been proven. */ class ChildLinkageStatus extends AbstractElement { public const STATUS_CHALLENGED = 'CHALLENGED'; public const STATUS_DISPROVEN = 'DISPROVEN'; public const STATUS_PROVEN = 'PROVEN'; /** * Convert a value to a canonical form. * * @param string $value * * @return string */ public function canonical(string $value): string { return strtoupper(parent::canonical($value)); } /** * A list of controlled values for this element * * @return array */ public function values(): array { return [ '' => '', self::STATUS_CHALLENGED => /* I18N: Status of child-parent link */ I18N::translate('challenged'), self::STATUS_DISPROVEN => /* I18N: Status of child-parent link */ I18N::translate('disproven'), self::STATUS_PROVEN => /* I18N: Status of child-parent link */ I18N::translate('proven'), ]; } }