Пример #1
0
 /**
  * Display an individual in a box - for charts, etc.
  *
  * @param Individual $individual
  *
  * @return string
  */
 public function individualBoxSmall(Individual $individual)
 {
     $personBoxClass = array_search($individual->getSex(), array('person_box' => 'M', 'person_boxF' => 'F', 'person_boxNN' => 'U'));
     if ($individual->getTree()->getPreference('SHOW_HIGHLIGHT_IMAGES')) {
         $thumbnail = $individual->displayImage();
     } else {
         $thumbnail = '';
     }
     return '<div data-pid="' . $individual->getXref() . '" class="person_box_template ' . $personBoxClass . ' iconz box-style0" style="width: ' . $this->parameter('compact-chart-box-x') . 'px; min-height: ' . $this->parameter('compact-chart-box-y') . 'px">' . '<div class="compact_view">' . $thumbnail . '<a href="' . $individual->getHtmlUrl() . '">' . '<span class="namedef name0">' . $individual->getFullName() . '</span>' . '</a>' . '<div class="inout2 details0">' . $individual->getLifeSpan() . '</div>' . '</div>' . '<div class="inout"></div>' . '</div>';
 }
Пример #2
0
 /**
  * Get the thumbnail image for the given person
  *
  * @param Individual $individual
  *
  * @return string
  */
 private function getThumbnail(Individual $individual)
 {
     if ($individual->getTree()->getPreference('SHOW_HIGHLIGHT_IMAGES')) {
         return $individual->displayImage();
     } else {
         return '';
     }
 }