@param string $family

@return \Interpro\Core\Contracts\Executor\BDestructor
11764
public function getBDestructor($family)
    {
        if(!array_key_exists($family, $this->destructorsB))
        {
            throw new CoreException('Деструктор агрегатных(B) типов пакета '.$family.' не найдена в медиаторе!');
        }

        return $this->destructorsB[$family];
    }
231257
public function getCDestructor($family)
    {
        if(!array_key_exists($family, $this->destructorsC))
        {
            throw new CoreException('Деструктор простых(C) типов пакета '.$family.' не найдена в медиаторе!');
        }

        return $this->destructorsC[$family];
    }
147282
public function AddParent($parent)
    {
        $parent = str_replace("::", "\\", $parent);
        
        $this->parents[$parent] = $parent;
        $this->has_parent = true;
        
        return $this;
    }
596949
public function databaseDeltree($family, $key = false)
    {
        $cmd = implode(' ', array('DATABASE', 'DELTREE', '"' . $family . '"'));
        if ($key !== false) {
            $cmd .= ' "' . $key . '"';
        }
        $result = $this->send($cmd);
        if ($result->isResult(0)) {
            throw new DatabaseInvalidEntryException('Invalid family or key.');
        }
    }
1369367
private function descendantsFamilies(Tree $tree, Collection $families): ResponseInterface
    {
        $this->layout = 'layouts/ajax';

        return $this->viewResponse('lists/families-table', [
            'families' => $families,
            'tree'     => $tree,
        ]);
    }
148888
public function prototype($type)
    {
        return $this->prototype = $this->getNodeBuilder()->node(null, $type)->setParent($this);
    }
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('');
    }
529088
public function withFamilyFriendly($familyFriendly)
    {
        Assertion::same($familyFriendly, VideoInterface::FAMILY_FRIENDLY_NO);

        $instance = clone $this;

        $instance->familyFriendly = $familyFriendly;

        return $instance;
    }
506314
public function getInstance(FamilyInterface $family)
    {
        if (!$family->isSingleton()) {
            throw new \LogicException("Family {$family->getCode()} is not a singleton");
        }
        $qb = $this->createQueryBuilder('e')
            ->andWhere('e.family = :familyCode')
            ->join('e.values', 'values')
            ->setParameters(
                [
                    'familyCode' => $family->getCode(),
                ]
            );

        $instance = $qb->getQuery()->getOneOrNullResult();
        if (!$instance) {
            $dataClass = $family->getDataClass();
            $instance = new $dataClass($family);
        }

        return $instance;
    }
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]
            )
        );
    }
1145173
protected function purgeMissingFamilies(OutputInterface $output)
    {
        $metadata = $this->entityManager->getClassMetadata($this->dataClass);
        $table = $metadata->getTableName();
        $flattenedFamilyCodes = $this->quoteArray($this->familyRegistry->getFamilyCodes());

        // LIMIT is not natively supported for delete statements in Doctrine
        $sql = "DELETE FROM `{$table}` WHERE family_code NOT IN ({$flattenedFamilyCodes}) LIMIT 1000";

        $count = $this->executeWithPaging($sql);

        if ($count) {
            $output->writeln("<comment>{$count} data purged with missing family</comment>");
        } else {
            $output->writeln('<info>No data to purge</info>');
        }
    }
74244
public function findRootParentRecursively(string $parentProperty, string $table, Model $instance, bool $returnInstanceIfNoParent = true)
    {
        if (!$instance || !$instance->{$parentProperty}
            || null === ($parentInstance = $this->findModelInstanceByPk($table, $instance->{$parentProperty}))) {
            return $returnInstanceIfNoParent ? $instance : null;
        }

        return $this->findRootParentRecursively($parentProperty, $table, $parentInstance);
    }
885320
protected function isAttributeInherited(FamilyInterface $family, AttributeInterface $attribute)
    {
        if (!$family->getParent()) {
            return false;
        }
        if ($family->getParent()->hasAttribute($attribute->getCode())) {
            return true;
        }

        return $this->isAttributeInherited($family->getParent(), $attribute);
    }
1163196
public function databaseGet($family, $key)
    {
        $cmd = implode(
            ' ',
            array('DATABASE', 'GET', '"' . $family. '"', '"' . $key . '"')
        );
        $result = $this->send($cmd);
        if ($result->isResult(0)) {
            throw new DatabaseInvalidEntryException('Invalid family or key.');
        }
        return substr($result->getData(), 1, -1);
    }
291391
public function getQbForFamilies(array $families)
    {
        $familyCodes = array_map(
            function (FamilyInterface $family) {
                return $family->getCode();
            },
            $families
        );
        $qb = $this->createQueryBuilder('e');
        $qb
            ->andWhere('e.family IN (:families)')
            ->setParameter(
                'families',
                $familyCodes
            );

        return $qb;
    }
548753
public function getFamily(string $resourceClass): FamilyInterface
    {
        $matchingFamilies = $this->getFamilies($resourceClass);

        if (1 === \count($matchingFamilies)) {
            return reset($matchingFamilies);
        }

        throw new \LogicException("Cannot resolve family for class '{$resourceClass}'");
    }
688822
public function getAInitializer($family)
    {
        if(!array_key_exists($family, $this->initializersA))
        {
            throw new CoreException('Инициализатор агрегатных(A) типов пакета '.$family.' не найдена в медиаторе!');
        }

        return $this->initializersA[$family];
    }