app/Module/BatchUpdate/BatchUpdateBasePlugin.php
public function getActionPreview(GedcomRecord $record): string
    {
        $old_lines   = explode("\n", $record->gedcom());
        $new_lines   = explode("\n", $this->updateRecord($record));
        $algorithm   = new MyersDiff();
        $differences = $algorithm->calculate($old_lines, $new_lines);
        $diff_lines  = [];

        foreach ($differences as $difference) {
            switch ($difference[1]) {
                case MyersDiff::DELETE:
                    $diff_lines[] = self::decorateDeletedText($difference[0]);
                    break;
                case MyersDiff::INSERT:
                    $diff_lines[] = self::decorateInsertedText($difference[0]);
                    break;
                default:
                    $diff_lines[] = $difference[0];
            }
        }

        return '<pre class="gedcom-data">' . self::createEditLinks(implode("\n", $diff_lines), $record) . '</pre>';
    }
public function getActionPreview(GedcomRecord $record): string
    {
        $old_lines   = explode("\n", $record->gedcom());
        $new_lines   = explode("\n", $this->updateRecord($record));
        $algorithm   = new MyersDiff();
        $differences = $algorithm->calculate($old_lines, $new_lines);
        $diff_lines  = [];

        foreach ($differences as $difference) {
            switch ($difference[1]) {
                case MyersDiff::DELETE:
                    $diff_lines[] = self::decorateDeletedText($difference[0]);
                    break;
                case MyersDiff::INSERT:
                    $diff_lines[] = self::decorateInsertedText($difference[0]);
                    break;
                default:
                    $diff_lines[] = $difference[0];
            }
        }

        return '<pre class="gedcom-data">' . self::createEditLinks(implode("\n", $diff_lines), $record) . '</pre>';
    }
public function getActionPreview ( GedcomRecord $ record ) : string { $ old_lines = explode ( "\n" , $ record -> gedcom ( ) ) ; $ new_lines = explode ( "\n" , $ this -> updateRecord ( $ record ) ) ; $ algorithm = new MyersDiff ( ) ; $ differences = $ algorithm -> calculate ( $ old_lines , $ new_lines ) ; $ diff_lines = [ ] ; foreach ( $ differences as $ difference ) { switch ( $ difference [ 1 ] ) { case MyersDiff :: DELETE : $ diff_lines [ ] = self :: decorateDeletedText ( $ difference [ 0 ] ) ; break ; case MyersDiff :: INSERT : $ diff_lines [ ] = self :: decorateInsertedText ( $ difference [ 0 ] ) ; break ; default : $ diff_lines [ ] = $ difference [ 0 ] ; } } return '<pre class="gedcom-data">' . self :: createEditLinks ( implode ( "\n" , $ diff_lines ) , $ record ) . '</pre>' ; }
Default previewer for plugins with no custom preview.

@param GedcomRecord $record

@return string
Default previewer for plugins with no custom preview .