本文整理匯總了PHP中Fisharebest\Webtrees\Functions\FunctionsPrint::formatParentsAges方法的典型用法代碼示例。如果您正苦於以下問題:PHP FunctionsPrint::formatParentsAges方法的具體用法?PHP FunctionsPrint::formatParentsAges怎麽用?PHP FunctionsPrint::formatParentsAges使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Fisharebest\Webtrees\Functions\FunctionsPrint
的用法示例。
在下文中一共展示了FunctionsPrint::formatParentsAges方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: summary
/**
* A one-line summary of the fact - for charts, etc.
*
* @return string
*/
public function summary()
{
$attributes = array();
$target = $this->getTarget();
if ($target) {
$attributes[] = $target->getFullName();
} else {
$value = $this->getValue();
if ($value && $value != 'Y') {
$attributes[] = '<span dir="auto">' . Filter::escapeHtml($value) . '</span>';
}
$date = $this->getDate();
if ($this->getTag() == 'BIRT' && $this->getParent() instanceof Individual && $this->getParent()->getTree()->getPreference('SHOW_PARENTS_AGE')) {
$attributes[] = $date->display() . FunctionsPrint::formatParentsAges($this->getParent(), $date);
} else {
$attributes[] = $date->display();
}
$place = $this->getPlace()->getShortName();
if ($place) {
$attributes[] = $place;
}
}
$class = 'fact_' . $this->getTag();
if ($this->isPendingAddition()) {
$class .= ' new';
} elseif ($this->isPendingDeletion()) {
$class .= ' old';
}
return '<div class="' . $class . '">' . I18N::translate('<span class="label">%1$s:</span> <span class="field" dir="auto">%2$s</span>', $this->getLabel(), implode(' — ', $attributes)) . '</div>';
}