Lines Matching refs:tree

76      * @param Tree   $tree
80 private function reformatRecord(string $rec, Tree $tree): string argument
206 $GEDCOM_MEDIA_PATH = $tree->getPreference('GEDCOM_MEDIA_PATH');
217 $newrec .= ($tree->getPreference('WORD_WRAPPED_NOTES') ? ' ' : '') . $data;
230 * @param Tree $tree import the record into this tree
236 public function importRecord(string $gedrec, Tree $tree, bool $update): void argument
238 $tree_id = $tree->id();
246 $gedrec = $this->reformatRecord($gedrec, $tree);
255 $tree->setPreference('imported', '1');
277 if ($tree->getPreference('GENERATE_UIDS') === '1' && !str_contains($gedrec, "\n1 _UID ")) {
280 $gedrec .= "\n1 _UID " . $element->default($tree);
287 if ($tree->getPreference('keep_media') === '1') {
307 $gedrec = $this->convertInlineMedia($tree, $gedrec);
311 $record = Registry::individualFactory()->new($xref, $gedrec, null, $tree);
332 $this->updatePlaces($xref, $tree, $gedrec);
363 $this->updatePlaces($xref, $tree, $gedrec);
413 $record = Registry::mediaFactory()->new($xref, $gedrec, null, $tree);
527 * @param Tree $tree
532 public function updatePlaces(string $xref, Tree $tree, string $gedrec): void argument
542 $place = new Place($place_name, $tree);
549 'pl_file' => $tree->id(),
703 * @param Tree $tree
708 private function convertInlineMedia(Tree $tree, string $gedcom): string argument
711 $xref = $this->createMediaObject($match[0], $tree);
715 $xref = $this->createMediaObject($match[0], $tree);
719 $xref = $this->createMediaObject($match[0], $tree);
737 * @param Tree $tree
741 private function createMediaObject(string $gedcom, Tree $tree): string argument
775 ->where('m_file', '=', $tree->id())
816 'm_file' => $tree->id(),
822 'm_file' => $tree->id(),
837 * @param Tree $tree
843 public function updateRecord(string $gedrec, Tree $tree, bool $delete): void argument
858 ->where('pl_file', '=', $tree->id())
876 ->where('d_file', '=', $tree->id())
881 ->where('n_file', '=', $tree->id())
886 ->where('l_file', '=', $tree->id())
893 ->where('i_file', '=', $tree->id())
900 ->where('f_file', '=', $tree->id())
907 ->where('s_file', '=', $tree->id())
914 ->where('m_file', '=', $tree->id())
919 ->where('m_file', '=', $tree->id())
926 ->where('o_file', '=', $tree->id())
932 $this->importRecord($gedrec, $tree, true);