record(); $tree = $parent->tree(); [, $tag] = explode(':', $fact->tag()); $label = $fact->label(); $value = $fact->value(); $type = $fact->attribute('TYPE'); $id = $fact->id(); $element = Registry::elementFactory()->make($fact->tag()); // New or deleted facts need different styling $styles = []; if ($fact->isPendingAddition()) { $styles[] = 'wt-new'; } if ($fact->isPendingDeletion()) { $styles[] = 'wt-old'; } // Event of close relative if ($tag === 'EVEN' && $value === 'CLOSE_RELATIVE') { $value = ''; $styles[] = 'wt-relation-fact collapse'; } // Event of close associates if ($id === 'asso') { $styles[] = 'wt-associate-fact collapse'; } if ($element instanceof UnknownElement && $tree->getPreference('HIDE_GEDCOM_ERRORS') === '0') { $styles[] = 'd-none'; } // historical facts if ($id === 'histo') { $styles[] = 'wt-historic-fact collapse'; } // Use marriage type as the label. e.g. "Civil partnership" if ($tag === 'MARR') { $label = $fact->label(); $type = ''; } ?>