. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Elements; use Fisharebest\Webtrees\Tree; use function view; /** * NAME_ROMANIZED_VARIATION := {Size=1:120} * The romanized variation of the name is written in the same form prescribed * for the name used in the superior context. The method used * to romanize the name is indicated by the line_value of the subordinate * , for example if romaji was used to provide a reading of a * name written in kanji, then the ROMANIZED_TYPE subordinate to the ROMN tag * would indicate romaji. See page 61. */ class NameRomanizedVariation extends AbstractElement { protected const MAXIMUM_LENGTH = 120; protected const SUBTAGS = [ 'TYPE' => '1:1', 'NPFX' => '0:1', 'GIVN' => '0:1', 'SPFX' => '0:1', 'SURN' => '0:1', 'NSFX' => '0:1', 'NICK' => '0:1', 'NOTE' => '0:M', 'SOUR' => '0:M', ]; /** * Should we collapse the children of this element when editing? * * @return bool */ public function collapseChildren(): bool { return true; } /** * An edit control for this data. * * @param string $id * @param string $name * @param string $value * @param Tree $tree * * @return string */ public function edit(string $id, string $name, string $value, Tree $tree): string { return '
' . parent::edit($id, $name, $value, $tree) . view('edit/input-addon-help', ['topic' => 'ROMN']) . '
'; } }