For close family relationships, such as the families tab and the family navigator
Display a tick if both individuals are the same.

@param Individual $individual1
@param Individual $individual2

@return string
497225
public static function getCloseRelationshipName(Individual $individual1, Individual $individual2): string
    {
        if ($individual1 === $individual2) {
            return self::reflexivePronoun($individual1);
        }

        try {
            $relationship = self::getRelationship($individual1, $individual2);

            return self::getRelationshipName($relationship);
        } catch (Exception $ex) {
            return '';
        }
    }
464074
protected function chart(Individual $individual, int $generations, bool $show_spouse): ResponseInterface
    {
        $this->layout = 'layouts/ajax';

        return $this->viewResponse('modules/hourglass-chart/chart', [
            'generations' => $generations,
            'individual'  => $individual,
            'show_spouse' => $show_spouse,
        ]);
    }
121598
public function getDetails(Individual $individual): string
    {
        $html = $this->getPersonDetails($individual, null);
        foreach ($individual->spouseFamilies() as $family) {
            $spouse = $family->spouse($individual);
            if ($spouse) {
                $html .= $this->getPersonDetails($spouse, $family);
            }
        }

        return $html;
    }
804693
public function getSosaNumbers(Individual $indi) {
        if(!$this->is_setup) return array();
        return Database::prepare(
                'SELECT majs_sosa, majs_gen FROM `##maj_sosa`'.
                ' WHERE majs_i_id=:indi_id AND majs_gedcom_id=:tree_id AND majs_user_id=:user_id'
            )->execute(array(
                'indi_id' => $indi->getXref(), 
                'tree_id' => $this->tree->getTreeId(), 
                'user_id' => $this->user->getUserId()
            ))->fetchAssoc();
    }
1019367
public function hExtendIndiHeaderIcons(IndividualController $ctrlIndi) {
	    if($ctrlIndi){
	        $dindi = new Individual($ctrlIndi->getSignificantIndividual());
	        if ($dindi->canDisplayIsSourced()) 
	            return FunctionsPrint::formatIsSourcedIcon('R', $dindi->isSourced(), 'INDI', 1, 'large');
	    }
	    return '';
	}
701913
public function generate(Individual $individual, Individual $head): string
    {
        $father = $this->father($individual);

        if ($father) {
            return $this->notCountry($father->getBirthPlace()->gedcomName());
        }

        return '';
    }
447361
private function summaryData(Individual $individual, Fact $fact): array
    {
        $record = $fact->record();
        $name   = '';
        $url    = '';
        $tag    = $fact->label();

        if ($record instanceof Family) {
            // Marriage
            $spouse = $record->spouse($individual);
            if ($spouse instanceof Individual) {
                $url  = $spouse->url();
                $name = $spouse->fullName();
            }
        } elseif ($record !== $individual) {
            // Birth of a child
            $url  = $record->url();
            $name = $record->fullName();
            $tag  = GedcomTag::getLabel('_BIRT_CHIL', $record);
        }

        return [
            'tag'    => $tag,
            'url'    => $url,
            'name'   => $name,
            'value'  => $fact->value(),
            'date'   => $fact->date()->display(true),
            'place'  => $fact->place(),
            'addtag' => false,
        ];
    }
430455
private function drawPersonName(Individual $individual, string $dashed): string
    {
        $family = $individual->primaryChildFamily();
        if ($family) {
            $family_name = strip_tags($family->fullName());
        } else {
            $family_name = I18N::translateContext('unknown family', 'unknown');
        }
        switch ($individual->sex()) {
            case 'M':
                /* I18N: e.g. “Son of [father name & mother name]” */
                $title = ' title="' . I18N::translate('Son of %s', $family_name) . '"';
                break;
            case 'F':
                /* I18N: e.g. “Daughter of [father name & mother name]” */
                $title = ' title="' . I18N::translate('Daughter of %s', $family_name) . '"';
                break;
            default:
                /* I18N: e.g. “Child of [father name & mother name]” */
                $title = ' title="' . I18N::translate('Child of %s', $family_name) . '"';
                break;
        }
        $sex = $individual->sex();

        return '<div class="tv' . $sex . ' ' . $dashed . '"' . $title . '><a href="' . e($individual->url()) . '"></a>' . $individual->fullName() . ' <span class="dates">' . $individual->getLifeSpan() . '</span></div>';
    }
266446
public function generate(Individual $individual, Individual $head): string
    {
        $birth_jd  = $individual->getBirthDate()->julianDay();
        $census_jd = $this->date()->julianDay();
        if ($birth_jd <= $census_jd && $birth_jd >= $census_jd - 365) {
            // Use the GEDCOM month, as we need this in English - for the US census
            return ucfirst(strtolower($individual->getBirthDate()->minimumDate()->format('%O')));
        }

        return '';
    }
638736
private function isChild(Individual $individual): bool
    {
        $age = Date::getAgeYears($individual->getEstimatedBirthDate(), $this->date());

        return $age < $this->age_adult;
    }
859441
public function generate(Individual $individual, Individual $head): string
    {
        $mother = $this->mother($individual);

        if ($mother) {
            return $this->notCountry($mother->getBirthPlace()->gedcomName());
        }

        return '';
    }
1173180
public function generate(Individual $individual, Individual $head): string
    {
        return $individual->getEstimatedBirthDate()->minimumDate()->format('%j %n %Y');
    }
761726
public function getPersonLi(Individual $person, $generations = 0): string
    {
        $icon     = $generations > 0 ? 'icon-minus' : 'icon-plus';
        $lifespan = $person->canShow() ? '(' . $person->getLifeSpan() . ')' : '';
        $spouses  = $generations > 0 ? $this->loadSpouses($person, 0) : '';

        return
            '<li class="sb_desc_indi_li">' .
            '<a class="sb_desc_indi" href="' . e(route('module', [
                'module' => $this->name(),
                'action' => 'Descendants',
                'ged'    => $person->tree()->name(),
                'xref'   => $person->xref(),
            ])) . '">' .
            '<i class="plusminus ' . $icon . '"></i>' .
            $person->getSexImage() . $person->fullName() . $lifespan .
            '</a>' .
            '<a href="' . e($person->url()) . '" title="' . strip_tags($person->fullName()) . '">' . view('icons/individual') . '</a>' .
            '<div>' . $spouses . '</div>' .
            '</li>';
    }
941508
public function individualBoxMenuFamilyLinks(Individual $individual): array
    {
        $menus = [];

        foreach ($individual->spouseFamilies() as $family) {
            $menus[] = new Menu('<strong>' . I18N::translate('Family with spouse') . '</strong>', $family->url());
            $spouse  = $family->spouse($individual);
            if ($spouse && $spouse->canShowName()) {
                $menus[] = new Menu($spouse->fullName(), $spouse->url());
            }
            foreach ($family->children() as $child) {
                if ($child->canShowName()) {
                    $menus[] = new Menu($child->fullName(), $child->url());
                }
            }
        }

        return $menus;
    }
307193
private function addAncestorsToCart(Individual $individual): void
    {
        $this->addRecordToCart($individual);

        foreach ($individual->childFamilies() as $family) {
            foreach ($family->spouses() as $parent) {
                $this->addAncestorsToCart($parent);
            }
        }
    }
238011
public function generate(Individual $individual, Individual $head): string
    {
        foreach ($individual->getAllNames() as $name) {
            $given = $name['givn'];
            $space_pos = strpos($given, ' ');

            if ($space_pos === false) {
                return $given;
            }

            return substr($given, 0, $space_pos + 2);
        }

        return '';
    }
697746
public function generate(Individual $individual, Individual $head): string
    {
        $birth_place  = $individual->getBirthPlace()->gedcomName();
        $census_place = $this->place();

        // Ignore the census country
        if ($birth_place === $census_place) {
            return '';
        }

        if (substr($birth_place, -strlen($census_place) - 2) === ', ' . $census_place) {
            return substr($birth_place, 0, -strlen($census_place) - 2);
        }

        return $birth_place;
    }