/**
  * Print a child family
  *
  * @param Individual $person
  * @param int        $depth the descendancy depth to show
  * @param string     $label
  * @param string     $gpid
  */
 public function printChildFamily(Individual $person, $depth, $label = '1.', $gpid = '')
 {
     if ($depth < 2) {
         return;
     }
     foreach ($person->getSpouseFamilies() as $family) {
         FunctionsCharts::printSosaFamily($family->getXref(), '', -1, $label, $person->getXref(), $gpid, 0, $this->showFull());
         $i = 1;
         foreach ($family->getChildren() as $child) {
             $this->printChildFamily($child, $depth - 1, $label . $i++ . '.', $person->getXref());
         }
     }
 }
Beispiel #2
0
     $controller->printChildAscendancy($controller->root, 1, $controller->generations - 1);
     echo '</ul>';
     echo '<br>';
     break;
 case 1:
     echo '<div id="ancestry_booklet">';
     // Booklet
     // first page : show indi facts
     FunctionsPrint::printPedigreePerson($controller->root, $controller->showFull());
     // process the tree
     $ancestors = $controller->sosaAncestors($controller->generations - 1);
     $ancestors = array_filter($ancestors);
     // The SOSA array includes empty placeholders
     foreach ($ancestors as $sosa => $individual) {
         foreach ($individual->getChildFamilies() as $family) {
             FunctionsCharts::printSosaFamily($family->getXref(), $individual->getXref(), $sosa, '', '', '', $controller->show_cousins, $controller->showFull());
         }
     }
     echo '</div>';
     break;
 case 2:
     // Individual list
     $ancestors = $controller->sosaAncestors($controller->generations);
     $ancestors = array_filter($ancestors);
     // The SOSA array includes empty placeholders
     echo '<div id="ancestry-list">', FunctionsPrintLists::individualTable($ancestors, 'sosa'), '</div>';
     break;
 case 3:
     // Family list
     $ancestors = $controller->sosaAncestors($controller->generations - 1);
     $ancestors = array_filter($ancestors);