本文整理汇总了PHP中Fisharebest\Webtrees\Individual::getHtmlUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Individual::getHtmlUrl方法的具体用法?PHP Individual::getHtmlUrl怎么用?PHP Individual::getHtmlUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fisharebest\Webtrees\Individual
的用法示例。
在下文中一共展示了Individual::getHtmlUrl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: drawPersonName
/**
* Draw a person name preceded by sex icon, with parents as tooltip
*
* @param Individual $individual an individual
* @param string $dashed if = 'dashed' print dashed top border to separate multiple spuses
*
* @return string
*/
private function drawPersonName(Individual $individual, $dashed = '')
{
if ($this->all_partners === 'true') {
$family = $individual->getPrimaryChildFamily();
if ($family) {
$family_name = strip_tags($family->getFullName());
} else {
$family_name = I18N::translateContext('unknown family', 'unknown');
}
switch ($individual->getSex()) {
case 'M':
$title = ' title="' . I18N::translate('Son of %s', $family_name) . '"';
break;
case 'F':
$title = ' title="' . I18N::translate('Daughter of %s', $family_name) . '"';
break;
default:
$title = ' title="' . I18N::translate('Child of %s', $family_name) . '"';
break;
}
} else {
$title = '';
}
$sex = $individual->getSex();
return '<div class="tv' . $sex . ' ' . $dashed . '"' . $title . '><a href="' . $individual->getHtmlUrl() . '"></a>' . $individual->getFullName() . ' <span class="dates">' . $individual->getLifeSpan() . '</span></div>';
}
示例2: individualBoxSmall
/**
* 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>';
}
示例3: htmlIndividualForList
/**
* Return HTML Code to display individual in non structured list (e.g. Patronymic Lineages)
*
* @param \Fisharebest\Webtrees\Individual $individual Individual to print
* @param bool $isStrong Bolden the name ?
* @return string HTML Code for individual item
*/
public static function htmlIndividualForList(\Fisharebest\Webtrees\Individual $individual, $isStrong = true)
{
$html = '';
$tag = 'em';
if ($isStrong) {
$tag = 'strong';
}
if ($individual && $individual->canShow()) {
$dindi = new Individual($individual);
$html = $individual->getSexImage();
$html .= '<a class="list_item" href="' . $individual->getHtmlUrl() . '" title="' . I18N::translate('Informations for individual %s', $individual->getXref()) . '">';
$html .= '<' . $tag . '>' . $individual->getFullName() . '</' . $tag . '> (' . $individual->getXref() . ') ';
$html .= FunctionsPrint::formatSosaNumbers($dindi->getSosaNumbers(), 1, 'small');
$html .= ' <span><small><em>' . $dindi->formatFirstMajorFact(WT_EVENTS_BIRT, 10) . '</em></small></span>';
$html .= ' <span><small><em>' . $dindi->formatFirstMajorFact(WT_EVENTS_DEAT, 10) . '</em></small></span>';
$html .= '</a>';
} else {
$html .= '<span class=\\"list_item\\"><' . $tag . '>' . I18N::translate('Private') . '</' . $tag . '></span>';
}
return $html;
}