當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。