当前位置: 首页>>代码示例>>PHP>>正文


PHP Family::getHtmlUrl方法代码示例

本文整理汇总了PHP中Fisharebest\Webtrees\Family::getHtmlUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Family::getHtmlUrl方法的具体用法?PHP Family::getHtmlUrl怎么用?PHP Family::getHtmlUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Fisharebest\Webtrees\Family的用法示例。


在下文中一共展示了Family::getHtmlUrl方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: printFamilyParents


//.........这里部分代码省略.........
         echo "</td>";
     }
     if ($hfam && $sosa != -1) {
         echo '<td valign="middle" rowspan="2">';
         self::printUrlArrow($sosa == 0 ? '?famid=' . $hfam->getXref() . '&amp;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">';
             FunctionsPrint::printPedigreePerson($hfam->getWife(), $show_full);
             echo '</td></tr></table>';
         } elseif ($hfam && !$hfam->getWife()) {
             // Empty box for grandmother
             echo "<table border='0'><tr>";
             echo '<td valign="top">';
             FunctionsPrint::printPedigreePerson($hfam->getWife(), $show_full);
             echo '</td></tr></table>';
         }
         echo '</td>';
     }
     echo '</tr></table>';
     if ($sosa && $family->canShow()) {
         foreach ($family->getFacts(WT_EVENTS_MARR) as $fact) {
             echo '<a href="', $family->getHtmlUrl(), '" class="details1">';
             echo str_repeat('&nbsp;', 10);
             echo $fact->summary();
             echo '</a>';
         }
     } else {
         echo '<br>';
     }
     /**
      * wife side
      */
     echo "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td rowspan=\"2\">";
     echo "<table><tr>";
     if ($parid) {
         if ($wife->getXref() == $parid) {
             self::printSosaNumber($label);
         } else {
             self::printSosaNumber($label, "", "blank");
         }
     } elseif ($sosa) {
         self::printSosaNumber($sosa * 2 + 1);
     }
     if ($wife->isPendingAddtion()) {
         echo '<td valign="top" class="facts_value new">';
     } elseif ($wife->isPendingDeletion()) {
         echo '<td valign="top" class="facts_value old">';
     } else {
         echo '<td valign="top">';
     }
     FunctionsPrint::printPedigreePerson($wife, $show_full);
     echo "</td></tr></table>";
     echo "</td>";
     // wife’s parents
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:67,代码来源:FunctionsCharts.php

示例2: drawFamily

    /**
     * Format a family.
     *
     * @param Family $family
     * @param string $title
     */
    private function drawFamily(Family $family, $title)
    {
        global $controller;
        ?>
		<tr>
			<td class="center" colspan="2">
				<a class="famnav_title" href="<?php 
        echo $family->getHtmlUrl();
        ?>
">
					<?php 
        echo $title;
        ?>
				</a>
			</td>
		</tr>
		<?php 
        foreach ($family->getSpouses() as $spouse) {
            $menu = new Menu(Functions::getCloseRelationshipName($controller->record, $spouse));
            $menu->addClass('', 'submenu flyout');
            $menu->addSubmenu(new Menu($this->getParents($spouse)));
            ?>
			<tr>
				<td class="facts_label">
					<?php 
            echo $menu->getMenu();
            ?>
				</td>
				<td class="center <?php 
            echo $controller->getPersonStyle($spouse);
            ?>
 nam">
					<a class="famnav_link" href="<?php 
            echo $spouse->getHtmlUrl();
            ?>
">
						<?php 
            echo $spouse->getFullName();
            ?>
					</a>
					<div class="font9">
						<?php 
            echo $spouse->getLifeSpan();
            ?>
					</div>
				</td>
			</tr>
		<?php 
        }
        foreach ($family->getChildren() as $child) {
            $menu = new Menu(Functions::getCloseRelationshipName($controller->record, $child));
            $menu->addClass('', 'submenu flyout');
            $menu->addSubmenu(new Menu($this->getFamily($child)));
            ?>
			<tr>
				<td class="facts_label">
					<?php 
            echo $menu->getMenu();
            ?>
				</td>
				<td class="center <?php 
            echo $controller->getPersonStyle($child);
            ?>
 nam">
					<a class="famnav_link" href="<?php 
            echo $child->getHtmlUrl();
            ?>
">
						<?php 
            echo $child->getFullName();
            ?>
					</a>
					<div class="font9">
						<?php 
            echo $child->getLifeSpan();
            ?>
					</div>
				</td>
			</tr>
		<?php 
        }
    }
开发者ID:tunandras,项目名称:webtrees,代码行数:88,代码来源:FamilyNavigatorModule.php

示例3: getFamilyLi

 /**
  * Format a family in a list.
  *
  * @param Family     $family
  * @param Individual $person
  * @param int        $generations
  *
  * @return string
  */
 public function getFamilyLi(Family $family, Individual $person, $generations = 0)
 {
     $spouse = $family->getSpouse($person);
     if ($spouse) {
         $spouse_name = $spouse->getSexImage() . $spouse->getFullName();
         $spouse_link = '<a class="icon-button_indi" href="' . $spouse->getHtmlUrl() . '"></a>';
     } else {
         $spouse_name = '';
         $spouse_link = '';
     }
     $marryear = $family->getMarriageYear();
     $marr = $marryear ? '<i class="icon-rings"></i>' . $marryear : '';
     return '<li class="sb_desc_indi_li">' . '<a class="sb_desc_indi" href="#"><i class="plusminus icon-minus"></i>' . $spouse_name . $marr . '</a>' . $spouse_link . '<a href="' . $family->getHtmlUrl() . '" class="icon-button_family"></a>' . '<div>' . $this->loadChildren($family, $generations) . '</div>' . '</li>';
 }
开发者ID:tronsmit,项目名称:webtrees,代码行数:23,代码来源:DescendancyModule.php

示例4: printFamily

    /**
     * Print a family group.
     *
     * @param Family $family
     * @param string $type
     * @param string $label
     */
    private function printFamily(Family $family, $type, $label)
    {
        global $controller;
        if ($family->getTree()->getPreference('SHOW_PRIVATE_RELATIONSHIPS')) {
            $access_level = Auth::PRIV_HIDE;
        } else {
            $access_level = Auth::accessLevel($family->getTree());
        }
        ?>
		<table>
			<tr>
				<td>
					<i class="icon-cfamily"></i>
				</td>
				<td>
					<span class="subheaders"> <?php 
        echo $label;
        ?>
</span>
					<a class="noprint" href="<?php 
        echo $family->getHtmlUrl();
        ?>
"> - <?php 
        echo I18N::translate('View this family');
        ?>
</a>
				</td>
			</tr>
		</table>
		<table class="facts_table">
		<?php 
        ///// HUSB /////
        $found = false;
        foreach ($family->getFacts('HUSB', false, $access_level) as $fact) {
            $found |= !$fact->isPendingDeletion();
            $person = $fact->getTarget();
            if ($person instanceof Individual) {
                if ($fact->isPendingAddition()) {
                    $class = 'facts_label new';
                } elseif ($fact->isPendingDeletion()) {
                    $class = 'facts_label old';
                } else {
                    $class = 'facts_label';
                }
                ?>
					<tr>
					<td class="<?php 
                echo $class;
                ?>
">
						<?php 
                echo Functions::getCloseRelationshipName($controller->record, $person);
                ?>
					</td>
					<td class="<?php 
                echo $controller->getPersonStyle($person);
                ?>
">
						<?php 
                echo Theme::theme()->individualBoxLarge($person);
                ?>
					</td>
					</tr>
				<?php 
            }
        }
        if (!$found && $family->canEdit()) {
            ?>
			<tr>
				<td class="facts_label"></td>
				<td class="facts_value"><a href="#" onclick="return add_spouse_to_family('<?php 
            echo $family->getXref();
            ?>
', 'HUSB');"><?php 
            echo I18N::translate('Add a husband to this family');
            ?>
</a></td>
			</tr>
			<?php 
        }
        ///// WIFE /////
        $found = false;
        foreach ($family->getFacts('WIFE', false, $access_level) as $fact) {
            $person = $fact->getTarget();
            if ($person instanceof Individual) {
                $found |= !$fact->isPendingDeletion();
                if ($fact->isPendingAddition()) {
                    $class = 'facts_label new';
                } elseif ($fact->isPendingDeletion()) {
                    $class = 'facts_label old';
                } else {
                    $class = 'facts_label';
                }
//.........这里部分代码省略.........
开发者ID:tronsmit,项目名称:webtrees,代码行数:101,代码来源:RelativesTabModule.php

示例5: printFamilyDescendancy

 /**
  * print a family descendancy
  *
  * @param Individual $person
  * @param Family     $family
  * @param int        $depth the descendancy depth to show
  */
 private function printFamilyDescendancy(Individual $person, Family $family, $depth)
 {
     $uid = Uuid::uuid4();
     // create a unique ID
     // print marriage info
     echo '<li>';
     echo '<img src="', Theme::theme()->parameter('image-spacer'), '" height="2" width="', Theme::theme()->parameter('chart-descendancy-indent') + 4, '">';
     echo '<span class="details1">';
     echo "<a href=\"#\" onclick=\"expand_layer('" . $uid . "'); return false;\" class=\"top\"><i id=\"" . $uid . "_img\" class=\"icon-minus\" title=\"" . I18N::translate('View this family') . "\"></i></a>";
     if ($family->canShow()) {
         foreach ($family->getFacts(WT_EVENTS_MARR) as $fact) {
             echo ' <a href="', $family->getHtmlUrl(), '" class="details1">', $fact->summary(), '</a>';
         }
     }
     echo '</span>';
     // print spouse
     $spouse = $family->getSpouse($person);
     echo '<ul id="' . $uid . '" class="generation">';
     echo '<li>';
     echo '<table><tr><td>';
     FunctionsPrint::printPedigreePerson($spouse, $this->showFull());
     echo '</td>';
     // check if spouse has parents and add an arrow
     echo '<td></td>';
     echo '<td>';
     if ($spouse) {
         foreach ($spouse->getChildFamilies() as $cfamily) {
             foreach ($cfamily->getSpouses() as $parent) {
                 FunctionsCharts::printUrlArrow('?rootid=' . $parent->getXref() . '&amp;generations=' . $this->generations . '&amp;chart_style=' . $this->chart_style . '&amp;show_full=' . $this->showFull() . '&amp;ged=' . $parent->getTree()->getNameUrl(), I18N::translate('Start at parents'), 2);
                 // only show the arrow for one of the parents
                 break;
             }
         }
     }
     if ($this->showFull()) {
         echo '<br><br>&nbsp;';
     }
     echo '</td></tr>';
     // children
     $children = $family->getChildren();
     echo '<tr><td colspan="3" class="details1" >&nbsp;&nbsp;';
     if ($children) {
         echo GedcomTag::getLabel('NCHI') . ': ' . count($children);
     } else {
         // Distinguish between no children (NCHI 0) and no recorded
         // children (no CHIL records)
         if (strpos($family->getGedcom(), '\\n1 NCHI 0')) {
             echo GedcomTag::getLabel('NCHI') . ': ' . count($children);
         } else {
             echo I18N::translate('No children');
         }
     }
     echo '</td></tr></table>';
     echo '</li>';
     if ($depth > 1) {
         foreach ($children as $child) {
             $this->printChildDescendancy($child, $depth - 1);
         }
     }
     echo '</ul>';
     echo '</li>';
 }
开发者ID:tronsmit,项目名称:webtrees,代码行数:69,代码来源:DescendancyController.php


注:本文中的Fisharebest\Webtrees\Family::getHtmlUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。