Find the mother of an individual

@param Individual $individual

@return Individual|null
435510
public function mother(Individual $individual): ?Individual
    {
        $family = $individual->primaryChildFamily();

        if ($family) {
            return $family->wife();
        }

        return null;
    }
1224745
public function getTabs(Individual $individual): Collection
    {
        return $this->module_service->findByComponent(ModuleTabInterface::class, $individual->tree(), Auth::user())
            ->filter(static function (ModuleTabInterface $tab) use ($individual): bool {
                return $tab->hasTabContent($individual);
            });
    }
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 '';
        }
    }
754553
public function getParent()
    {
        $parentID = $this->getField("ParentID");
        if ($parentID) {
            return SiteTree::get_by_id(self::class, $parentID);
        }
        return null;
    }
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 '';
    }
482511
public function getParent($idParent)
    {
        if ($parent = $this->qb
            ->select($this->table . '.*')
            ->from($this->table)
            ->where($this->primaryKey, $idParent)
            ->get(1)) {
            if ($parent->count() == 1) {
                return $parent->first();
            }
        }

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

        foreach ($individual->childFamilies() as $family) {
            foreach ($family->spouses() as $parent) {
                $this->addAncestorsToCart($parent);
            }
        }
    }
503640
public function generate(Individual $individual, Individual $head): string
    {
        switch ($individual->sex()) {
            case 'M':
                return $this->male;
            case 'F':
                return $this->female;
            default:
                return '';
        }
    }
392856
public static function retrievePerson($id, $personId, $params = null, $opts = null)
    {
        return self::_retrieveNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts);
    }
713656
public function find_parent_by_tag($tag)
	{
		$node = $this->parent();

		while($this->parent() != null
			&& !$node instanceof Node_Container_Document)
		{
			if($node->tag() === $tag)
				return $node;

			$node = $node->parent();
		}

		return null;
	}
1238476
private function associateFacts(Individual $person): array
    {
        $facts = [];

        /** @var Individual[] $associates */
        $associates = array_merge(
            $person->linkedIndividuals('ASSO'),
            $person->linkedIndividuals('_ASSO'),
            $person->linkedFamilies('ASSO'),
            $person->linkedFamilies('_ASSO')
        );
        foreach ($associates as $associate) {
            foreach ($associate->facts() as $fact) {
                $arec = $fact->attribute('_ASSO');
                if (!$arec) {
                    $arec = $fact->attribute('ASSO');
                }
                if ($arec && trim($arec, '@') === $person->xref()) {
                    // Extract the important details from the fact
                    $factrec = '1 ' . $fact->getTag();
                    if (preg_match('/\n2 DATE .*/', $fact->gedcom(), $match)) {
                        $factrec .= $match[0];
                    }
                    if (preg_match('/\n2 PLAC .*/', $fact->gedcom(), $match)) {
                        $factrec .= $match[0];
                    }
                    if ($associate instanceof Family) {
                        foreach ($associate->spouses() as $spouse) {
                            $factrec .= "\n2 _ASSO @" . $spouse->xref() . '@';
                        }
                    } else {
                        $factrec .= "\n2 _ASSO @" . $associate->xref() . '@';
                    }
                    $facts[] = new Fact($factrec, $associate, 'asso');
                }
            }
        }

        return $facts;
    }
699471
public function getParent()
    {
        if ($this->path === '/') {
            return null;
        }

        return $this->nodeDataRepository->findOneByPath($this->parentPath, $this->workspace);
    }
1017451
public function computeFromIndividual(Individual $indi) {
        $dindi = new \MyArtJaub\Webtrees\Individual($indi);
        $current_sosas = $dindi->getSosaNumbers();
        foreach($current_sosas as $current_sosa => $gen) {
            $this->sosa_provider->deleteAncestors($current_sosa);
            $this->addNode($indi, $current_sosa);
        }
        $this->flushTmpSosaTable(true);
        return true;
    }
1340115
public function getParent($name = NULL)
  {
    if (!$this->parent) {
      return FALSE;
    }
    if ($name) {
      if ($this->parent->getName() == $name) {
        return $this->parent;
      }
      if ($parent = $this->parent->getInclude($name)) {
        return $parent;
      }
      // Recurse up the tree to find if the parent is in the tree.
      return $this->parent->getParent($name);
    }
    return $this->parent;
  }
1144659
public function generate(Individual $individual, Individual $head): string
    {
        $birth_date = $individual->getBirthDate();

        if ($birth_date->minimumJulianDay() === $birth_date->maximumJulianDay()) {
            return $birth_date->minimumDate()->format('%j. %F %Y');
        }

        return '';
    }
235342
public function generate(Individual $individual, Individual $head): string
    {
        if ($individual === $head) {
            return 'head';
        }

        return Functions::getCloseRelationshipName($head, $individual);
    }
655231
public function spouseFamily(Individual $individual): ?Family
    {
        // Exclude families that were created after this census date
        $families = [];
        foreach ($individual->spouseFamilies() as $family) {
            if (Date::compare($family->getMarriageDate(), $this->date()) <= 0) {
                $families[] = $family;
            }
        }

        if (empty($families)) {
            return null;
        }

        usort($families, static function (Family $x, Family $y): int {
            return Date::compare($x->getMarriageDate(), $y->getMarriageDate());
        });

        return end($families);
    }