当前位置: 首页>>代码示例>>PHP>>正文


PHP EB::isTeamAdmin方法代码示例

本文整理汇总了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;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:42,代码来源:views.php

示例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 
        }
        ?>
开发者ID:knigherrant,项目名称:decopatio,代码行数:30,代码来源:default.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');
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:35,代码来源:view.html.php

示例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');
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:31,代码来源:default.php

示例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');
开发者ID:knigherrant,项目名称:decopatio,代码行数:31,代码来源:default.php


注:本文中的EB::isTeamAdmin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。