예제 #1
0
 /**
  * Print the numbers of individuals.
  *
  * @param int      $level
  * @param string[] $parent
  */
 private function printHowManyPeople($level, $parent)
 {
     global $WT_TREE;
     $stats = new Stats($WT_TREE);
     $place_count_indi = 0;
     $place_count_fam = 0;
     if (!isset($parent[$level - 1])) {
         $parent[$level - 1] = '';
     }
     $p_id = $this->setPlaceIdMap($level, $parent);
     $indi = $stats->statsPlaces('INDI', false, $p_id);
     $fam = $stats->statsPlaces('FAM', false, $p_id);
     foreach ($indi as $place) {
         $place_count_indi = $place['tot'];
     }
     foreach ($fam as $place) {
         $place_count_fam = $place['tot'];
     }
     echo '<br><br>', I18N::translate('Individuals'), ': ', $place_count_indi, ', ', I18N::translate('Families'), ': ', $place_count_fam;
 }