本文整理汇总了PHP中TBGSettings::isPersonaAvailable方法的典型用法代码示例。如果您正苦于以下问题:PHP TBGSettings::isPersonaAvailable方法的具体用法?PHP TBGSettings::isPersonaAvailable怎么用?PHP TBGSettings::isPersonaAvailable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TBGSettings
的用法示例。
在下文中一共展示了TBGSettings::isPersonaAvailable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: link_tag
echo link_tag(make_url('configure'), image_tag('tab_config.png') . __('Configure %thebuggenie_name', array('%thebuggenie_name' => TBGSettings::getTBGname())));
?>
<?php
}
?>
<?php
TBGEvent::createNew('core', 'user_dropdown_reg')->trigger();
?>
<?php
echo link_tag('http://www.thebuggenie.com/help/' . TBGContext::getRouting()->getCurrentRouteName(), image_tag('help.png') . __('Help for this page'), array('id' => 'global_help_link'));
?>
<a href="<?php
echo make_url('logout');
?>
" onclick="<?php
if (TBGSettings::isPersonaAvailable()) {
?>
if (navigator.id) { navigator.id.logout();return false; }<?php
}
?>
"><?php
echo image_tag('logout.png') . __('Logout');
?>
</a>
<div class="header"><?php
echo __('Your issues');
?>
</div>
<?php
echo link_tag(make_url('my_reported_issues'), image_tag('icon_savedsearch.png') . __('Issues reported by me'));
?>
示例2: include_component
</div>
<div id="fullpage_backdrop_content" class="fullpage_backdrop_content"> </div>
</div>
<?php
if (TBGContext::getRouting()->getCurrentRouteName() != 'login_page' && $tbg_user->isGuest()) {
?>
<div id="login_backdrop" class="fullpage_backdrop" style="display: none;">
<div id="login_content" class="fullpage_backdrop_content">
<?php
include_component('main/loginpopup', array('content' => get_component_html('main/login'), 'mandatory' => false));
?>
</div>
</div>
<?php
}
if (TBGSettings::isPersonaAvailable() && ($tbg_user->isGuest() || $tbg_request->hasCookie('tbg3_persona_session'))) {
?>
<script src="https://login.persona.org/include.js"></script>
<script type="text/javascript">
document.observe('dom:loaded', function() {
var currentUser = <?php
echo !$tbg_user->isGuest() ? "'{$tbg_user->getEmail()}'" : 'null';
?>
;
navigator.id.watch({
loggedInUser: currentUser,
onlogin: function(assertion) {
// A user has logged in! Here you need to:
// 1. Send the assertion to your backend for verification and to create a session.
// 2. Update your UI.