本文整理汇总了PHP中Fisharebest\Webtrees\Individual::isPendingAddtion方法的典型用法代码示例。如果您正苦于以下问题:PHP Individual::isPendingAddtion方法的具体用法?PHP Individual::isPendingAddtion怎么用?PHP Individual::isPendingAddtion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fisharebest\Webtrees\Individual
的用法示例。
在下文中一共展示了Individual::isPendingAddtion方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPersonStyle
/**
* get the person box stylesheet class for the given person
*
* @param Individual $person
*
* @return string returns 'person_box', 'person_boxF', or 'person_boxNN'
*/
public function getPersonStyle($person)
{
switch ($person->getSex()) {
case 'M':
$class = 'person_box';
break;
case 'F':
$class = 'person_boxF';
break;
default:
$class = 'person_boxNN';
break;
}
if ($person->isPendingDeletion()) {
$class .= ' old';
} elseif ($person->isPendingAddtion()) {
$class .= ' new';
}
return $class;
}
示例2: printFamilyParents
/**
* print the parents table for a family
*
* @param Family $family family gedcom ID
* @param int $sosa child sosa number
* @param string $label indi label (descendancy booklet)
* @param string $parid parent ID (descendancy booklet)
* @param string $gparid gd-parent ID (descendancy booklet)
* @param int $show_full large or small box
*/
public static function printFamilyParents(Family $family, $sosa = 0, $label = '', $parid = '', $gparid = '', $show_full = 1)
{
if ($show_full) {
$pbheight = Theme::theme()->parameter('chart-box-y') + 14;
} else {
$pbheight = Theme::theme()->parameter('compact-chart-box-y') + 14;
}
$husb = $family->getHusband();
if ($husb) {
echo '<a name="', $husb->getXref(), '"></a>';
} else {
$husb = new Individual('M', "0 @M@ INDI\n1 SEX M", null, $family->getTree());
}
$wife = $family->getWife();
if ($wife) {
echo '<a name="', $wife->getXref(), '"></a>';
} else {
$wife = new Individual('F', "0 @F@ INDI\n1 SEX F", null, $family->getTree());
}
if ($sosa) {
echo '<p class="name_head">', $family->getFullName(), '</p>';
}
/**
* husband side
*/
echo "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td rowspan=\"2\">";
echo "<table border='0'><tr>";
if ($parid) {
if ($husb->getXref() == $parid) {
self::printSosaNumber($label);
} else {
self::printSosaNumber($label, "", "blank");
}
} elseif ($sosa) {
self::printSosaNumber($sosa * 2);
}
if ($husb->isPendingAddtion()) {
echo '<td valign="top" class="facts_value new">';
} elseif ($husb->isPendingDeletion()) {
echo '<td valign="top" class="facts_value old">';
} else {
echo '<td valign="top">';
}
FunctionsPrint::printPedigreePerson($husb, $show_full);
echo "</td></tr></table>";
echo "</td>";
// husband’s parents
$hfam = $husb->getPrimaryChildFamily();
if ($hfam) {
// remove the|| test for $sosa
echo "<td rowspan=\"2\"><img src=\"" . Theme::theme()->parameter('image-hline') . "\" alt=\"\"></td><td rowspan=\"2\"><img src=\"" . Theme::theme()->parameter('image-vline') . "\" width=\"3\" height=\"" . ($pbheight + 9) . "\" alt=\"\"></td>";
echo "<td><img class=\"line5\" src=\"" . Theme::theme()->parameter('image-hline') . "\" alt=\"\"></td><td>";
// husband’s father
if ($hfam && $hfam->getHusband()) {
echo "<table border='0'><tr>";
if ($sosa > 0) {
self::printSosaNumber($sosa * 4, $hfam->getHusband()->getXref(), "down");
}
if (!empty($gparid) && $hfam->getHusband()->getXref() == $gparid) {
self::printSosaNumber(trim(substr($label, 0, -3), ".") . ".");
}
echo "<td valign=\"top\">";
FunctionsPrint::printPedigreePerson($hfam->getHusband(), $show_full);
echo "</td></tr></table>";
} elseif ($hfam && !$hfam->getHusband()) {
// Empty box for grandfather
echo "<table border='0'><tr>";
echo '<td valign="top">';
FunctionsPrint::printPedigreePerson($hfam->getHusband(), $show_full);
echo '</td></tr></table>';
}
echo "</td>";
}
if ($hfam && $sosa != -1) {
echo '<td valign="middle" rowspan="2">';
self::printUrlArrow($sosa == 0 ? '?famid=' . $hfam->getXref() . '&ged=' . $hfam->getTree()->getNameUrl() : '#' . $hfam->getXref(), $hfam->getXref(), 1);
echo '</td>';
}
if ($hfam) {
// husband’s mother
echo "</tr><tr><td><img src=\"" . Theme::theme()->parameter('image-hline') . "\" alt=\"\"></td><td>";
if ($hfam && $hfam->getWife()) {
echo "<table border='0'><tr>";
if ($sosa > 0) {
self::printSosaNumber($sosa * 4 + 1, $hfam->getWife()->getXref(), "down");
}
if (!empty($gparid) && $hfam->getWife()->getXref() == $gparid) {
self::printSosaNumber(trim(substr($label, 0, -3), ".") . ".");
}
echo '<td valign="top">';
//.........这里部分代码省略.........