app/Services/ClipboardService.php
public function pasteFact(string $fact_id, GedcomRecord $record): bool
    {
        $clipboard = Session::get('clipboard');

        $record_type = $record::RECORD_TYPE;

        if (isset($clipboard[$record_type][$fact_id])) {
            $record->createFact($clipboard[$record_type][$fact_id]['factrec'], true);

            return true;
        }

        return false;
    }
public function pasteFact(string $fact_id, GedcomRecord $record): bool
    {
        $clipboard = Session::get('clipboard');

        $record_type = $record::RECORD_TYPE;

        if (isset($clipboard[$record_type][$fact_id])) {
            $record->createFact($clipboard[$record_type][$fact_id]['factrec'], true);

            return true;
        }

        return false;
    }
public function pasteFact ( string $ fact_id , GedcomRecord $ record ) : bool { $ clipboard = Session :: get ( 'clipboard' ) ; $ record_type = $ record :: RECORD_TYPE ; if ( isset ( $ clipboard [ $ record_type ] [ $ fact_id ] ) ) { $ record -> createFact ( $ clipboard [ $ record_type ] [ $ fact_id ] [ 'factrec' ] , true ) ; return true ; } return false ; }
Copy a fact from the clipboard to a record.

@param string       $fact_id
@param GedcomRecord $record

@return bool
Copy a fact from the clipboard to a record .