/** * Format a family in a list. * * @param Family $family * @param Individual $person * @param int $generations * * @return string */ public function getFamilyLi(Family $family, Individual $person, $generations = 0) { $spouse = $family->getSpouse($person); if ($spouse) { $spouse_name = $spouse->getSexImage() . $spouse->getFullName(); $spouse_link = '<a class="icon-button_indi" href="' . $spouse->getHtmlUrl() . '"></a>'; } else { $spouse_name = ''; $spouse_link = ''; } $marryear = $family->getMarriageYear(); $marr = $marryear ? '<i class="icon-rings"></i>' . $marryear : ''; return '<li class="sb_desc_indi_li">' . '<a class="sb_desc_indi" href="#"><i class="plusminus icon-minus"></i>' . $spouse_name . $marr . '</a>' . $spouse_link . '<a href="' . $family->getHtmlUrl() . '" class="icon-button_family"></a>' . '<div>' . $this->loadChildren($family, $generations) . '</div>' . '</li>'; }