本文整理汇总了PHP中EB::isTeamAdmin方法的典型用法代码示例。如果您正苦于以下问题:PHP EB::isTeamAdmin方法的具体用法?PHP EB::isTeamAdmin怎么用?PHP EB::isTeamAdmin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EB
的用法示例。
在下文中一共展示了EB::isTeamAdmin方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDashboardToolbar
/**
* Use explicitly on dashboard view only.
*
* @since 4.0
* @access public
* @param string
* @return
*/
public function getDashboardToolbar()
{
// Get total pending blog posts
$model = EB::model('Blogs');
$total = $model->getTotalPending();
$totalTeamRequest = 0;
// Get total team requests to join team.
if (EB::isTeamAdmin()) {
$teamModel = EB::model('TeamBlogs');
$totalTeamRequest = $teamModel->getTotalRequest();
}
// Get the logout link
$logoutActionLink = 'index.php?option=com_users&task=user.logout';
// @task: Determine if the current user is a blogger or not.
$isBlogger = EB::isSiteAdmin() || $this->acl->get('add_entry');
// Get the logout return url
$itemId = EB::router()->getItemid('latest');
$logoutReturn = base64_encode(EB::_('index.php?option=com_easyblog&view=latest&Itemid=' . $itemId, false));
// Get the current active layout
$layout = $this->input->get('layout', '', 'cmd');
// Get the current user
$user = EB::user(JFactory::getUser()->id);
// Get the template
$theme = EB::template();
$theme->set('current', $this->getLayout());
$theme->set('isBlogger', $isBlogger);
$theme->set('totalPending', $total);
$theme->set('user', $user);
$theme->set('logoutURL', $logoutReturn);
$theme->set('logoutActionLink', $logoutActionLink);
$theme->set('totalTeamRequest', $totalTeamRequest);
$output = $theme->output('site/dashboard/toolbar/default');
return $output;
}
示例2:
<li>
<a href="<?php
echo EB::_('index.php?option=com_easyblog&view=subscription');
?>
">
<i class="fa fa-envelope"></i> <?php
echo JText::_('COM_EASYBLOG_TOOLBAR_MANAGE_SUBSCRIPTIONS');
?>
</a>
</li>
<?php
}
?>
<?php
if ((EB::isTeamAdmin() || EB::isSiteAdmin()) && $this->config->get('toolbar_teamrequest')) {
?>
<li>
<a href="<?php
echo EBR::_('index.php?option=com_easyblog&view=dashboard&layout=requests');
?>
">
<i class="fa fa-users"></i> <?php
echo JText::_('COM_EASYBLOG_TOOLBAR_TEAM_REQUESTS');
?>
</a>
</li>
<?php
}
?>
示例3: requests
/**
* Displays a list of team requests
*
* @since 5.0
* @access public
* @param string
* @return
*/
public function requests()
{
// Require the user to be logged in.
EB::requireLogin();
// Ensure that the user really has access to this listing
if (!EB::isSiteAdmin() && !EB::isTeamAdmin()) {
$this->info->set('COM_EASYBLOG_NOT_ALLOWED', 'error');
return $this->app->redirect(EBR::_('index.php?option=com_easyblog&view=dashboard', false));
}
// Set the page title
$title = EB::getPageTitle(JText::_('COM_EASYBLOG_DASHBOARD_REQUESTS_PAGE_TITLE'));
parent::setPageTitle($title, false, $this->config->get('main_pagetitle_autoappend'));
// Set the breadcrumbs
$this->setViewBreadcrumb('dashboard');
$this->setPathway(JText::_('COM_EASYBLOG_DASHBOARD_BREADCRUMB_REQUESTS'));
$model = EB::model('TeamBlogs');
$userId = EB::isSiteAdmin() ? '' : $this->my->id;
$requests = $model->getRequests($userId);
foreach ($requests as &$request) {
$request->user = EB::user($request->user_id);
$request->team = EB::table('Teamblog');
$request->team->load($request->team_id);
$request->date = EB::date($request->created);
}
$this->set('requests', $requests);
parent::display('dashboard/requests/default');
}
示例4:
?>
">
<i class="fa fa-inbox"></i>
<span class="eb-text"><?php
echo JText::_('COM_EASYBLOG_DASHBOARD_TOOLBAR_PENDING');
?>
</span>
<b class="hide" data-pending-counter>0</b>
</a>
</li>
<?php
}
?>
<?php
if (EB::isSiteAdmin() || EB::isTeamAdmin()) {
?>
<li class="<?php
echo $current == 'requests' ? 'active' : '';
?>
" data-placement="bottom" data-eb-provide="tooltip" data-original-title="<?php
echo JText::_('COM_EASYBLOG_DASHBOARD_TOOLBAR_TEAM_REQUESTS');
?>
">
<a href="<?php
echo EB::_('index.php?option=com_easyblog&view=dashboard&layout=requests');
?>
">
<i class="fa fa-users"></i>
<span class="eb-text"><?php
echo JText::_('COM_EASYBLOG_TOOLBAR_TEAM_REQUESTS');
示例5:
echo EB::_('index.php?option=com_easyblog&view=dashboard&layout=pending');
?>
">
<i class="fa fa-inbox"></i>
<span class="eb-text"><?php
echo JText::_('COM_EASYBLOG_DASHBOARD_TOOLBAR_PENDING');
?>
</span>
</a>
</li>
<?php
}
?>
<?php
if ((EB::isSiteAdmin() || EB::isTeamAdmin()) && $this->config->get('layout_dashboardteamrequest')) {
?>
<li class="<?php
echo $current == 'requests' ? 'active' : '';
?>
" data-placement="bottom" data-eb-provide="tooltip" data-original-title="<?php
echo JText::_('COM_EASYBLOG_DASHBOARD_TOOLBAR_TEAM_REQUESTS');
?>
">
<a href="<?php
echo EB::_('index.php?option=com_easyblog&view=dashboard&layout=requests');
?>
">
<i class="fa fa-users"></i>
<span class="eb-text"><?php
echo JText::_('COM_EASYBLOG_TOOLBAR_TEAM_REQUESTS');