本文整理汇总了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;
}