app/Module/LifespansChartModule.php
protected function closeFamily(Individual $individual): array
    {
        $xrefs = [];

        foreach ($individual->spouseFamilies() as $family) {
            foreach ($family->children() as $child) {
                $xrefs[] = $child->xref();
            }

            foreach ($family->spouses() as $spouse) {
                $xrefs[] = $spouse->xref();
            }
        }

        foreach ($individual->childFamilies() as $family) {
            foreach ($family->children() as $child) {
                $xrefs[] = $child->xref();
            }

            foreach ($family->spouses() as $spouse) {
                $xrefs[] = $spouse->xref();
            }
        }

        return $xrefs;
    }
protected function closeFamily(Individual $individual): array
    {
        $xrefs = [];

        foreach ($individual->spouseFamilies() as $family) {
            foreach ($family->children() as $child) {
                $xrefs[] = $child->xref();
            }

            foreach ($family->spouses() as $spouse) {
                $xrefs[] = $spouse->xref();
            }
        }

        foreach ($individual->childFamilies() as $family) {
            foreach ($family->children() as $child) {
                $xrefs[] = $child->xref();
            }

            foreach ($family->spouses() as $spouse) {
                $xrefs[] = $spouse->xref();
            }
        }

        return $xrefs;
    }
protected function closeFamily ( Individual $ individual ) : array { $ xrefs = [ ] ; foreach ( $ individual -> spouseFamilies ( ) as $ family ) { foreach ( $ family -> children ( ) as $ child ) { $ xrefs [ ] = $ child -> xref ( ) ; } foreach ( $ family -> spouses ( ) as $ spouse ) { $ xrefs [ ] = $ spouse -> xref ( ) ; } } foreach ( $ individual -> childFamilies ( ) as $ family ) { foreach ( $ family -> children ( ) as $ child ) { $ xrefs [ ] = $ child -> xref ( ) ; } foreach ( $ family -> spouses ( ) as $ spouse ) { $ xrefs [ ] = $ spouse -> xref ( ) ; } } return $ xrefs ; }
Find the close family members of an individual.

@param Individual $individual

@return string[]
Find the close family members of an individual .