Fisharebest\Webtrees\Config::emptyFacts PHP Method

emptyFacts() public static method

return string[]
public static emptyFacts ( )
    public static function emptyFacts()
    {
        return array('ADOP', 'ANUL', 'BAPL', 'BAPM', 'BARM', 'BASM', 'BIRT', 'BLES', 'BURI', 'CENS', 'CHAN', 'CHR', 'CHRA', 'CONF', 'CONL', 'CREM', 'DATA', 'DEAT', 'DIV', 'DIVF', 'EMIG', 'ENDL', 'ENGA', 'FCOM', 'GRAD', 'HUSB', 'IMMI', 'MAP', 'MARB', 'MARC', 'MARL', 'MARR', 'MARS', 'NATU', 'ORDN', 'PROB', 'RESI', 'RETI', 'SLGC', 'SLGS', 'WIFE', 'WILL', '_HOL', '_NMR', '_NMAR', '_SEPR');
    }

Usage Example

Exemplo n.º 1
0
 /**
  * builds the form for adding new facts
  *
  * @param string $fact the new fact we are adding
  */
 public static function createAddForm($fact)
 {
     global $tags, $WT_TREE;
     $tags = array();
     // handle  MARRiage TYPE
     if (substr($fact, 0, 5) === 'MARR_') {
         $tags[0] = 'MARR';
         self::addSimpleTag('1 MARR');
         self::insertMissingSubtags($fact);
     } else {
         $tags[0] = $fact;
         if ($fact === '_UID') {
             $fact .= ' ' . GedcomTag::createUid();
         }
         // These new level 1 tags need to be turned into links
         if (in_array($fact, array('ALIA', 'ASSO'))) {
             $fact .= ' @';
         }
         if (in_array($fact, Config::emptyFacts())) {
             self::addSimpleTag('1 ' . $fact . ' Y');
         } else {
             self::addSimpleTag('1 ' . $fact);
         }
         self::insertMissingSubtags($tags[0]);
         //-- handle the special SOURce case for level 1 sources [ 1759246 ]
         if ($fact === 'SOUR') {
             self::addSimpleTag('2 PAGE');
             self::addSimpleTag('3 TEXT');
             if ($WT_TREE->getPreference('FULL_SOURCES')) {
                 self::addSimpleTag('3 DATE', '', GedcomTag::getLabel('DATA:DATE'));
                 self::addSimpleTag('2 QUAY');
             }
         }
     }
 }