本文整理汇总了PHP中EasyBlogRouter::getItemid方法的典型用法代码示例。如果您正苦于以下问题:PHP EasyBlogRouter::getItemid方法的具体用法?PHP EasyBlogRouter::getItemid怎么用?PHP EasyBlogRouter::getItemid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EasyBlogRouter
的用法示例。
在下文中一共展示了EasyBlogRouter::getItemid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showToolbar
function showToolbar($current, $user)
{
$acl = EasyBlogACLHelper::getRuleSet();
$config = EasyBlogHelper::getConfig();
$joomlaVersion = EasyBlogHelper::getJoomlaVersion();
$homeItemId = EasyBlogRouter::getItemid('latest');
$logoutURL = base64_encode(EasyBlogRouter::_('index.php?option=com_easyblog&view=latest&Itemid=' . $homeItemId, false));
$model = $this->getModel('Blogs');
$total = $model->getTotalPending();
$isTeamAdmin = EasyBlogHelper::isTeamAdmin();
$totalTeamRequest = 0;
if ($isTeamAdmin) {
$teamModel = $this->getModel('TeamBlogs');
$totalTeamRequest = $teamModel->getTotalRequest();
}
// @task: Get total draft entries
$draftsModel = $this->getModel('Drafts');
$totalDrafts = $draftsModel->getTotal();
//get the logout link
$logoutActionLink = '';
if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
$logoutActionLink = 'index.php?option=com_users&task=user.logout';
} else {
$logoutActionLink = 'index.php?option=com_user&task=logout';
}
// @task: Determine if the current user is a blogger or not.
$isBlogger = EasyBlogHelper::isSiteAdmin() || $acl->rules->add_entry;
$tpl = new CodeThemes('dashboard');
$tpl->set('isBlogger', $isBlogger);
$tpl->set('totalPending', $total);
$tpl->set('user', $user);
$tpl->set('current', $current);
$tpl->set('acl', $acl);
$tpl->set('config', $config);
$tpl->set('logoutURL', $logoutURL);
$tpl->set('logoutActionLink', $logoutActionLink);
$tpl->set('isTeamAdmin', $isTeamAdmin);
$tpl->set('totalTeamRequest', $totalTeamRequest);
$tpl->set('totalDrafts', $totalDrafts);
return $tpl->fetch('dashboard.toolbar.php');
}