app/Functions/FunctionsEdit.php
public static function addSimpleTags(Tree $tree, $fact): void
    {
        // For new individuals, these facts default to "Y"
        if ($fact === 'MARR') {
            echo self::addSimpleTag($tree, '0 ' . $fact . ' Y');
        } else {
            echo self::addSimpleTag($tree, '0 ' . $fact);
        }

        if (!in_array($fact, Config::nonDateFacts(), true)) {
            echo self::addSimpleTag($tree, '0 DATE', $fact, GedcomTag::getLabel($fact . ':DATE'));
            echo self::addSimpleTag($tree, '0 RELI', $fact, GedcomTag::getLabel($fact . ':RELI'));
        }

        if (!in_array($fact, Config::nonPlaceFacts(), true)) {
            echo self::addSimpleTag($tree, '0 PLAC', $fact, GedcomTag::getLabel($fact . ':PLAC'));

            if (preg_match_all('/(' . Gedcom::REGEX_TAG . ')/', $tree->getPreference('ADVANCED_PLAC_FACTS'), $match)) {
                foreach ($match[1] as $tag) {
                    echo self::addSimpleTag($tree, '0 ' . $tag, $fact, GedcomTag::getLabel($fact . ':PLAC:' . $tag));
                }
            }
            echo self::addSimpleTag($tree, '0 MAP', $fact);
            echo self::addSimpleTag($tree, '0 LATI', $fact);
            echo self::addSimpleTag($tree, '0 LONG', $fact);
        }
    }
public static function addSimpleTags(Tree $tree, $fact): void
    {
        // For new individuals, these facts default to "Y"
        if ($fact === 'MARR') {
            echo self::addSimpleTag($tree, '0 ' . $fact . ' Y');
        } else {
            echo self::addSimpleTag($tree, '0 ' . $fact);
        }

        if (!in_array($fact, Config::nonDateFacts(), true)) {
            echo self::addSimpleTag($tree, '0 DATE', $fact, GedcomTag::getLabel($fact . ':DATE'));
            echo self::addSimpleTag($tree, '0 RELI', $fact, GedcomTag::getLabel($fact . ':RELI'));
        }

        if (!in_array($fact, Config::nonPlaceFacts(), true)) {
            echo self::addSimpleTag($tree, '0 PLAC', $fact, GedcomTag::getLabel($fact . ':PLAC'));

            if (preg_match_all('/(' . Gedcom::REGEX_TAG . ')/', $tree->getPreference('ADVANCED_PLAC_FACTS'), $match)) {
                foreach ($match[1] as $tag) {
                    echo self::addSimpleTag($tree, '0 ' . $tag, $fact, GedcomTag::getLabel($fact . ':PLAC:' . $tag));
                }
            }
            echo self::addSimpleTag($tree, '0 MAP', $fact);
            echo self::addSimpleTag($tree, '0 LATI', $fact);
            echo self::addSimpleTag($tree, '0 LONG', $fact);
        }
    }
public static function addSimpleTags ( Tree $ tree , $ fact ) : void { // For new individuals, these facts default to "Y" if ( $ fact === 'MARR' ) { echo self :: addSimpleTag ( $ tree , '0 ' . $ fact . ' Y' ) ; } else { echo self :: addSimpleTag ( $ tree , '0 ' . $ fact ) ; } if ( ! in_array ( $ fact , Config :: nonDateFacts ( ) , true ) ) { echo self :: addSimpleTag ( $ tree , '0 DATE' , $ fact , GedcomTag :: getLabel ( $ fact . ':DATE' ) ) ; echo self :: addSimpleTag ( $ tree , '0 RELI' , $ fact , GedcomTag :: getLabel ( $ fact . ':RELI' ) ) ; } if ( ! in_array ( $ fact , Config :: nonPlaceFacts ( ) , true ) ) { echo self :: addSimpleTag ( $ tree , '0 PLAC' , $ fact , GedcomTag :: getLabel ( $ fact . ':PLAC' ) ) ; if ( preg_match_all ( '/(' . Gedcom :: REGEX_TAG . ')/' , $ tree -> getPreference ( 'ADVANCED_PLAC_FACTS' ) , $ match ) ) { foreach ( $ match [ 1 ] as $ tag ) { echo self :: addSimpleTag ( $ tree , '0 ' . $ tag , $ fact , GedcomTag :: getLabel ( $ fact . ':PLAC:' . $ tag ) ) ; } } echo self :: addSimpleTag ( $ tree , '0 MAP' , $ fact ) ; echo self :: addSimpleTag ( $ tree , '0 LATI' , $ fact ) ; echo self :: addSimpleTag ( $ tree , '0 LONG' , $ fact ) ; } }
Add some empty tags to create a new fact.

@param Tree   $tree
@param string $fact

@return void
Add some empty tags to create a new fact .