@param Family $family

@return void
328081
private function addFamilyAndChildrenToCart(Family $family): void
    {
        $this->addRecordToCart($family);

        foreach ($family->spouses() as $spouse) {
            $this->addRecordToCart($spouse);
        }
        foreach ($family->children() as $child) {
            $this->addRecordToCart($child);
        }
    }
976937
public function setFamily(FamilyInterface $family = null): FamilyPermission
    {
        $this->familyCode = $family ? $family->getCode() : null;

        return $this;
    }
1305808
protected function getFileHeader(FamilyInterface $family)
    {
        $content = <<<EOT
<?php

namespace Sidus\EAV;

use Doctrine\Common\Collections\Collection;

abstract class {$family->getCode()} extends 
EOT;
        if ($family->getParent()) {
            $content .= $family->getParent()->getCode();
        } else {
            $content .= '\\'.$family->getDataClass();
        }
        $content .= "\n{\n";

        return $content;
    }
899305
public function assignTo($group): void
    {
        $group = $this->resolveGroup($group);

        $this->groups()->attach($group);
    }
874744
public static function checkFamilyAccess(Family $family = null, $edit = false): void
    {
        if ($family === null) {
            throw new FamilyNotFoundException();
        }

        if (!$family->canShow()) {
            throw new FamilyAccessDeniedException();
        }

        if ($edit && !$family->canEdit()) {
            throw new FamilyAccessDeniedException();
        }
    }
1371455
protected function processNewLemmas($family, array $new_lemmas = [], array $old_lemmas = [])
    {
        // Get new lemmas
        $lemmas = array_diff_key($new_lemmas, $old_lemmas);

        // Remove any never obsolete values
        if ($this->config('ask_for_value') === false) {
            $lemmas = array_filter($lemmas, function ($key) {
                if ($this->neverObsolete($key)) {
                    $this->line("        <comment>Manually add:</comment> <info>{$key}</info>");
                    $this->has_new = true;

                    return false;
                }

                return true;
            }, ARRAY_FILTER_USE_KEY);
        }

        // Process new lemmas
        if (count($lemmas) > 0) {
            $this->is_dirty = true;
            $this->has_new = true;

            // Sort lemmas by key
            ksort($lemmas);

            $this->info("    " . count($lemmas) . " new strings to translate");

            foreach ($lemmas as $key => $path) {
                $value = $this->decodeKey($key);

                // Only ask for feedback when it's not a dirty check
                if ($this->option('dirty') === false && $this->config('ask_for_value') === true) {
                    $value = $this->ask(
                        "{$family}.{$value}", $this->createSuggestion($value)
                    );
                }

                if ($this->option('verbose')) {
                    $this->line("        <info>{$key}</info> in " . $this->getShortPath($path));
                }

                Arr::set($this->final_lemmas,
                    $key, str_replace('%LEMMA', $value, $this->option('new-value'))
                );
            }

            return true;
        }

        return false;
    }
443310
public function getByParent(FamilyInterface $family)
    {
        $families = [];
        foreach ($this->families as $subFamily) {
            if ($subFamily->getParent() && $subFamily->getParent()->getCode() === $family->getCode()) {
                $families[$subFamily->getCode()] = $subFamily;
            }
        }

        return $families;
    }
987123
protected function hasCreatedEntity(FamilyInterface $family, $reference)
    {
        return array_key_exists($family->getCode(), $this->createdEntities)
            && array_key_exists(
                $reference,
                $this->createdEntities[$family->getCode()]
            );
    }
74875
protected function getQueryBuilderByFamily(Request $request, FamilyInterface $family)
    {
        $m = __METHOD__.' is deprecated and now internal to the '.FamilySearchAction::class.' action/service';

        throw new \BadMethodCallException($m);
    }
336769
public function getFamily($family)
    {
        if(array_key_exists($family, $this->familyTypes))
        {
            return $this->familyTypes[$family];
        }
        else
        {
            throw new TaxonomyException('Не найдена коллекция типов пакета '.$family);
        }
    }
628688
private function whereFamily(bool $fams, Builder $query): void
    {
        if ($fams) {
            $query->join('link', static function (JoinClause $join): void {
                $join
                    ->on('l_from', '=', 'n_id')
                    ->on('l_file', '=', 'n_file')
                    ->where('l_type', '=', 'FAMS');
            });
        }
    }
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.');
        }
    }
265022
protected function execute(InputInterface $input, OutputInterface $output)
    {
        foreach ($this->familyRegistry->getFamilies() as $family) {
            $this->updateFamilyData($family, $output);
        }
    }
3473
public function databaseDel($family, $key)
    {
        $cmd = implode(
            ' ',
            array(
                'DATABASE', 'DELTREE', '"' . $family. '"', '"' . $key . '"'
            )
        );
        $result = $this->send($cmd);
        if ($result->isResult(0)) {
            throw new DatabaseInvalidEntryException('Invalid family or key.');
        }
    }
1358058
protected function getFamilyConfig($family)
    {
        if (!isset($this->config[$family])) {
            throw new \InvalidArgumentException(
                sprintf('Undefined measure family "%s"', $family)
            );
        }

        return $this->config[$family];
    }
18767
private function significant(Family $family): stdClass
    {
        $significant = (object) [
            'family'     => $family,
            'individual' => null,
            'surname'    => '',
        ];

        foreach ($family->spouses()->merge($family->children()) as $individual) {
            $significant->individual = $individual;
            [$significant->surname] = explode(',', $individual->sortName());
            break;
        }

        return $significant;
    }
570441
public ModifyColumnFamiliesRequest addFamily(String familyId, GCRule gcRule) {
    Preconditions.checkNotNull(gcRule);
    Modification.Builder modification = Modification.newBuilder().setId(familyId);
    modification.getCreateBuilder().setGcRule(gcRule.toProto());
    modFamilyRequest.addModifications(modification.build());
    return this;
  }