本文整理匯總了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;
}
示例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);
}
示例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;
}