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


PHP PageController::getSignificantIndividual方法代码示例

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


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

示例1: getSignificantIndividual

 /**
  * Get significant information from this page, to allow other pages such as
  * charts and reports to initialise with the same records
  *
  * @return Individual
  */
 public function getSignificantIndividual()
 {
     if ($this->root) {
         return $this->root;
     } else {
         return parent::getSignificantIndividual();
     }
 }
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:14,代码来源:ChartController.php

示例2: index

 /**
  * WelcomeBlock@index
  * 
  * @param PageController $parent_controller
  * @param Tree $tree
  * @param string $block_id
  * @param string $template
  * @return $string
  */
 public function index(PageController $parent_controller, Tree $tree, $block_id, $template)
 {
     $view_bag = new ViewBag();
     if ($parent_controller && $tree) {
         $view_bag->set('tree', $tree);
         $view_bag->set('indi', $parent_controller->getSignificantIndividual());
         $id = $this->module->getName() . $block_id;
         $class = $this->module->getName() . '_block';
         $parent_controller->addInlineJavascript('
             jQuery("#maj-new_passwd").hide();
             jQuery("#maj-passwd_click").click(function()
             {
                 jQuery("#maj-new_passwd").slideToggle(100, function() {
                     jQuery("#maj-new_passwd_username").focus();
 			});
 					return false;
 				  });
 			');
         if (Auth::isAdmin()) {
             $title = '<a class="icon-admin" title="' . I18N::translate('Configure') . '" href="block_edit.php?block_id=' . $block_id . '&amp;ged=' . $tree->getNameHtml() . '&amp;ctype=gedcom"></a>';
         } else {
             $title = '';
         }
         $title .= '<span dir="auto">' . $tree->getTitleHtml() . '</span>';
         $piwik_enabled = $this->module->getBlockSetting($block_id, 'piwik_enabled', false);
         $view_bag->set('piwik_enabled', $piwik_enabled);
         if ($piwik_enabled) {
             $parent_controller->addInlineJavascript('$("#piwik_stats")
                     .load("module.php?mod=' . $this->module->getName() . '&mod_action=Piwik&block_id=' . $block_id . '");');
         }
         $content = ViewFactory::make('WelcomeBlock', $this, new BaseController(), $view_bag)->getHtmlPartial();
         if ($template) {
             return Theme::theme()->formatBlock($id, $title, $class, $content);
         } else {
             return $content;
         }
     }
 }
开发者ID:jon48,项目名称:webtrees-lib,代码行数:47,代码来源:WelcomeBlockController.php

示例3: getSignificantIndividual

 /**
  * Get significant information from this page, to allow other pages such as
  * charts and reports to initialise with the same records
  *
  * @return Individual
  */
 public function getSignificantIndividual()
 {
     global $WT_TREE;
     if ($this->people) {
         return $this->people[0];
     } else {
         return parent::getSignificantIndividual();
     }
 }
开发者ID:tronsmit,项目名称:webtrees,代码行数:15,代码来源:TimelineController.php

示例4: switch

 }
 if (!isset($input['default'])) {
     $input['default'] = '';
 }
 if (!isset($input['lookup'])) {
     $input['lookup'] = '';
 }
 if ($input['type'] == 'text') {
     echo '<input';
     switch ($input['lookup']) {
         case 'INDI':
             echo ' data-autocomplete-type="INDI"';
             if (!empty($pid)) {
                 $input['default'] = $pid;
             } else {
                 $input['default'] = $controller->getSignificantIndividual()->getXref();
             }
             break;
         case 'FAM':
             echo ' data-autocomplete-type="FAM"';
             if (!empty($famid)) {
                 $input['default'] = $famid;
             } else {
                 $input['default'] = $controller->getSignificantFamily()->getXref();
             }
             break;
         case 'SOUR':
             echo ' data-autocomplete-type="SOUR"';
             if (!empty($sid)) {
                 $input['default'] = $sid;
             }
开发者ID:jflash,项目名称:webtrees,代码行数:31,代码来源:reportengine.php

示例5: getSignificantIndividual

 /**
  * Get significant information from this page, to allow other pages such as
  * charts and reports to initialise with the same records
  *
  * @return Individual
  */
 public function getSignificantIndividual()
 {
     global $WT_TREE;
     if ($this->pids) {
         return Individual::getInstance($this->pids[0], $WT_TREE);
     } else {
         return parent::getSignificantIndividual();
     }
 }
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:15,代码来源:TimelineController.php


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