當前位置: 首頁>>代碼示例>>PHP>>正文


PHP EasyBlogHelper::getJoomlaUserGroups方法代碼示例

本文整理匯總了PHP中EasyBlogHelper::getJoomlaUserGroups方法的典型用法代碼示例。如果您正苦於以下問題:PHP EasyBlogHelper::getJoomlaUserGroups方法的具體用法?PHP EasyBlogHelper::getJoomlaUserGroups怎麽用?PHP EasyBlogHelper::getJoomlaUserGroups使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在EasyBlogHelper的用法示例。


在下文中一共展示了EasyBlogHelper::getJoomlaUserGroups方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getGroups

 function getGroups($teamId)
 {
     $db = EasyBlogHelper::db();
     $query = 'SELECT * FROM `#__easyblog_team_groups` ' . 'WHERE `team_id`=' . $db->Quote($teamId);
     $db->setQuery($query);
     $rows = $db->loadObjectList();
     $groups = array();
     if ($rows) {
         foreach ($rows as $row) {
             $group = EasyBlogHelper::getJoomlaUserGroups($row->group_id);
             $groups[] = $group[0];
         }
     }
     return $groups;
 }
開發者ID:alexinteam,項目名稱:joomla3,代碼行數:15,代碼來源:view.html.php

示例2: display

 function display($tpl = null)
 {
     // @rule: Test for user access if on 1.6 and above
     if (EasyBlogHelper::getJoomlaVersion() >= '1.6') {
         if (!JFactory::getUser()->authorise('easyblog.manage.user', 'com_easyblog')) {
             JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
             JFactory::getApplication()->close();
         }
     }
     //initialise variables
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $groups = EasyBlogHelper::getJoomlaUserGroups();
     $this->assign('groups', $groups);
     parent::display($tpl);
 }
開發者ID:alexinteam,項目名稱:joomla3,代碼行數:17,代碼來源:view.html.php

示例3: getAssignedACL

 public function getAssignedACL()
 {
     $db = EasyBlogHelper::db();
     $acl = array();
     $query = 'SELECT a.`category_id`, a.`content_id`, a.`status`, b.`id` as `acl_id`';
     $query .= ' FROM `#__easyblog_category_acl` as a';
     $query .= ' LEFT JOIN `#__easyblog_category_acl_item` as b';
     $query .= ' ON a.`acl_id` = b.`id`';
     $query .= ' WHERE a.`category_id` = ' . $db->Quote($this->id);
     $query .= ' AND a.`type` = ' . $db->Quote('group');
     //echo $query;
     $db->setQuery($query);
     $result = $db->loadObjectList();
     $joomlaGroups = EasyBlogHelper::getJoomlaUserGroups();
     if (EasyBlogHelper::getJoomlaVersion() < '1.6') {
         $guest = new stdClass();
         $guest->id = '0';
         $guest->name = 'Public';
         $guest->level = '0';
         array_unshift($joomlaGroups, $guest);
     }
     $acl = $this->_mapRules($result, $joomlaGroups);
     return $acl;
 }
開發者ID:knigherrant,項目名稱:decopatio,代碼行數:24,代碼來源:category.php


注:本文中的EasyBlogHelper::getJoomlaUserGroups方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。