本文整理汇总了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();
}
}
示例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 . '&ged=' . $tree->getNameHtml() . '&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;
}
}
}
示例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();
}
}
示例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;
}
示例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();
}
}