@param string $artefact
@param string $family

@return bool
510064
public function inspect($artefact = 'all', $family = 'all')
    {
        $report = false;

        if($artefact === 'all' and $family === 'all')
        {
            foreach($this->cleaners as $cleaner)
            {
                $report = ($report or $cleaner->inspect());
            }
        }
        elseif($artefact === 'all' and $family !== 'all')
        {
            if(array_key_exists($family, $this->cleaner_by_family))
            {
                foreach($this->cleaner_by_family[$family] as $cleaner)
                {
                    $report = ($report or $cleaner->inspect());
                }
            }
            else
            {
                $this->consoleOutput->writeln('Чистильщиков для пакета '.$family.' не найдено в медиаторе!');
            }
        }
        elseif($artefact !== 'all' and $family === 'all')
        {
            if(array_key_exists($artefact, $this->cleaner_by_art))
            {
                foreach($this->cleaner_by_art[$artefact] as $cleaner)
                {
                    $report = ($report or $cleaner->inspect());
                }
            }
            else
            {
                $this->consoleOutput->writeln('Чистильщиков для артефактов '.$artefact.' не найдено в медиаторе!');
            }
        }
        elseif($artefact !== 'all' and $family !== 'all')
        {
            $cleaner = $this->getCleaner($artefact, $family);

            if($cleaner)
            {
                $report = ($report or $cleaner->inspect());
            }
        }

        return $report;
    }
1338005
public function familyList(ServerRequestInterface $request, Tree $tree, UserInterface $user, ?ModuleListInterface $moduleListInterface): ResponseInterface
    {
        return $this->individualOrFamilyList($request, $tree, $user, true, $moduleListInterface);
    }
1139842
public void checkFamily(final Family family) {
        final LocalDate familyDate = analyzeDates(family);
        final LocalDate seenDate = earliestDate(seenFamily);
        if (seenDate == null) {
            if (familyDate != null) {
                seenFamily = family;
            }
        } else {
            if (familyDate != null) {
                if (familyDate.isBefore(seenDate)) {
                    final Person spouse = (new FamilyNavigator(family))
                            .getSpouse(person);
                    final Person seenSpouse = (new FamilyNavigator(seenFamily))
                            .getSpouse(person);
                    final String message = String.format(
                            "Family order: family with spouse %s (%s) is after "
                            + "family with spouse %s (%s)",
                            spouse.getName().getString(),
                            familyDate.toString(),
                            seenSpouse.getName().getString(),
                            seenDate.toString());
                    getResult().addMismatch(message);
                }
                seenFamily = family;
            }
        }
    }
253800
public function getQbForFamiliesAndIdentifier(array $families, $term)
    {
        $eavQb = $this->createEAVQueryBuilder();
        $orCondition = [];
        foreach ($families as $family) {
            $identifierAttribute = $family->getAttributeAsIdentifier();
            if (!$identifierAttribute) {
                throw new \LogicException("Family {$family->getCode()} has no identifier");
            }
            $orCondition[] = $eavQb->attribute($identifierAttribute)->like($term);
        }

        return $eavQb->apply($eavQb->getOr($orCondition));
    }
823788
protected function getCreatedEntity(FamilyInterface $family, $reference)
    {
        if (!$this->hasCreatedEntity($family, $reference)) {
            return null;
        }

        return $this->createdEntities[$family->getCode()][$reference];
    }
529088
public function withFamilyFriendly($familyFriendly)
    {
        Assertion::same($familyFriendly, VideoInterface::FAMILY_FRIENDLY_NO);

        $instance = clone $this;

        $instance->familyFriendly = $familyFriendly;

        return $instance;
    }
1277127
public function getRefererDatas(
        FamilyInterface $family = null,
        AttributeInterface $attribute = null,
        array $context = null
    ) {
        $datas = new ArrayCollection();
        foreach ($this->getRefererValues($family, $attribute, $context) as $refererValue) {
            $data = $refererValue->getData();
            if ($data) {
                $datas[] = $data;
            }
        }

        return $datas;
    }
205727
public function changeFamilyMembersAction(ServerRequestInterface $request, Tree $tree): ResponseInterface
    {
        $xref   = $request->get('xref', '');
        $family = Family::getInstance($xref, $tree);
        Auth::checkFamilyAccess($family, true);

        $HUSB = $request->get('HUSB', '');
        $WIFE = $request->get('WIFE', '');
        $CHIL = $request->get('CHIL', []);

        // Current family members
        $old_father   = $family->husband();
        $old_mother   = $family->wife();
        $old_children = $family->children();

        // New family members
        $new_father   = Individual::getInstance($HUSB, $tree);
        $new_mother   = Individual::getInstance($WIFE, $tree);
        $new_children = [];
        foreach ($CHIL as $child) {
            $new_children[] = Individual::getInstance($child, $tree);
        }

        if ($old_father !== $new_father) {
            if ($old_father) {
                // Remove old FAMS link
                foreach ($old_father->facts(['FAMS']) as $fact) {
                    if ($fact->target() === $family) {
                        $old_father->deleteFact($fact->id(), true);
                    }
                }
                // Remove old HUSB link
                foreach ($family->facts(['HUSB', 'WIFE']) as $fact) {
                    if ($fact->target() === $old_father) {
                        $family->deleteFact($fact->id(), true);
                    }
                }
            }
            if ($new_father) {
                // Add new FAMS link
                $new_father->createFact('1 FAMS @' . $family->xref() . '@', true);
                // Add new HUSB link
                $family->createFact('1 HUSB @' . $new_father->xref() . '@', true);
            }
        }

        if ($old_mother !== $new_mother) {
            if ($old_mother) {
                // Remove old FAMS link
                foreach ($old_mother->facts(['FAMS']) as $fact) {
                    if ($fact->target() === $family) {
                        $old_mother->deleteFact($fact->id(), true);
                    }
                }
                // Remove old WIFE link
                foreach ($family->facts(['HUSB', 'WIFE']) as $fact) {
                    if ($fact->target() === $old_mother) {
                        $family->deleteFact($fact->id(), true);
                    }
                }
            }
            if ($new_mother) {
                // Add new FAMS link
                $new_mother->createFact('1 FAMS @' . $family->xref() . '@', true);
                // Add new WIFE link
                $family->createFact('1 WIFE @' . $new_mother->xref() . '@', true);
            }
        }

        foreach ($old_children as $old_child) {
            if ($old_child && !in_array($old_child, $new_children, true)) {
                // Remove old FAMC link
                foreach ($old_child->facts(['FAMC']) as $fact) {
                    if ($fact->target() === $family) {
                        $old_child->deleteFact($fact->id(), true);
                    }
                }
                // Remove old CHIL link
                foreach ($family->facts(['CHIL']) as $fact) {
                    if ($fact->target() === $old_child) {
                        $family->deleteFact($fact->id(), true);
                    }
                }
            }
        }

        foreach ($new_children as $new_child) {
            if ($new_child && !$old_children->contains($new_child)) {
                // Add new FAMC link
                $new_child->createFact('1 FAMC @' . $family->xref() . '@', true);
                // Add new CHIL link
                $family->createFact('1 CHIL @' . $new_child->xref() . '@', true);
            }
        }

        return redirect($family->url());
    }
749785
public function addFamily(Family $fams) {
		if($fams && !isset($this->linked_fams[$fams])) {
			$this->linked_fams[$fams] = array();
		}
	}
1164961
protected function isAllowedAttributes(FamilyInterface $family, $attributeCode)
    {
        if ('label' === $attributeCode && $family->hasAttribute('label')) {
            return true;
        }

        return !\in_array($attributeCode, $this->ignoredAttributes, true);
    }
515681
private function drawChildren(Collection $familyList, int $gen = 1, bool $ajax = false): string
    {
        $html          = '';
        $children2draw = [];
        $f2load        = [];

        foreach ($familyList as $f) {
            $children = $f->children();
            if ($children->isNotEmpty()) {
                $f2load[] = $f->xref();
                foreach ($children as $child) {
                    // Eliminate duplicates - e.g. when adopted by a step-parent
                    $children2draw[$child->xref()] = $child;
                }
            }
        }
        $tc = count($children2draw);
        if ($tc) {
            $f2load = implode(',', $f2load);
            $nbc    = 0;
            foreach ($children2draw as $child) {
                $nbc++;
                if ($tc == 1) {
                    $co = 'c'; // unique
                } elseif ($nbc == 1) {
                    $co = 't'; // first
                } elseif ($nbc == $tc) {
                    $co = 'b'; //last
                } else {
                    $co = 'h';
                }
                $html .= $this->drawPerson($child, $gen - 1, -1, null, $co, false);
            }
            if (!$ajax) {
                $html = '<td align="right"' . ($gen == 0 ? ' abbr="c' . $f2load . '"' : '') . '>' . $html . '</td>' . $this->drawHorizontalLine();
            }
        }

        return $html;
    }
684840
public function getChildFamilyLabel(Family $family): string
    {
        if (preg_match('/\n1 FAMC @' . $family->xref() . '@(?:\n[2-9].*)*\n2 PEDI (.+)/', $this->gedcom(), $match)) {
            // A specified pedigree
            return GedcomCodePedi::getChildFamilyLabel($match[1]);
        }

        // Default (birth) pedigree
        return GedcomCodePedi::getChildFamilyLabel('');
    }
901819
public function setFamily($family)
    {
        if (!isset($this->config[$family])) {
            throw new UnknownFamilyMeasureException();
        }

        $this->family = $family;

        return $this;
    }
637930
public static function validate($familyFriendly)
    {
        if (false !== ($familyFriendly = YesNoValidator::validate($familyFriendly))) {
            return \ucfirst($familyFriendly);
        }

        return false;
    }
438513
protected int getArtefactCount(String artefactType) {
        ArtefactInfo info = getArtefactInfo(artefactType);
        return info == null ? 0 : info.getClasses().length;
    }
419065
public function listAction(Request $request, FamilyInterface $family)
    {
        $this->setFamily($family);
        $dataGrid = $this->getDataGrid();

        $this->bindDataGridRequest($dataGrid, $request);

        // Handle quick export directly in datagrid
        $form = $dataGrid->getForm();
        if ($form->isSubmitted() && $form->isValid()) {
            $button = $form->getClickedButton();
            if ($button && 'export' === $button->getName()) {
                return $this->redirectToExport($dataGrid, $request->getSession());
            }
        }

        return $this->renderAction(
            array_merge(
                $this->getViewParameters($request),
                ['datagrid' => $dataGrid]
            )
        );
    }
774395
public AnyDelete addFamilyVersion(String family, final long timestamp) {
        delete.addFamilyVersion(toFamilyQualifierBytes(family), timestamp);

        return this;
    }