本文整理汇总了PHP中JModuleHelper::_caclConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP JModuleHelper::_caclConfig方法的具体用法?PHP JModuleHelper::_caclConfig怎么用?PHP JModuleHelper::_caclConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JModuleHelper
的用法示例。
在下文中一共展示了JModuleHelper::_caclConfig方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/**
* Load published modules
*
* @access private
* @return array
*/
function &_load()
{
global $mainframe, $Itemid;
static $modules;
if (isset($modules)) {
return $modules;
}
$user =& JFactory::getUser();
$db =& JFactory::getDBO();
$aid = $user->get('aid', 0);
$modules = array();
$wheremenu = isset($Itemid) ? ' AND ( mm.menuid = ' . (int) $Itemid . ' OR mm.menuid = 0 )' : '';
$query = 'SELECT id, title, module, position, content, showtitle, control, params' . ' FROM #__modules AS m' . ' LEFT JOIN #__modules_menu AS mm ON mm.moduleid = m.id' . ' WHERE m.published = 1' . ' AND m.access <= ' . (int) $aid . ' AND m.client_id = ' . (int) $mainframe->getClientId() . $wheremenu . ' ORDER BY position, ordering';
$db->setQuery($query);
if (null === ($modules = $db->loadObjectList())) {
JError::raiseWarning('SOME_ERROR_CODE', JText::_('Error Loading Modules') . $db->getErrorMsg());
return false;
}
// cACL module check
if (class_exists('CACL_config')) {
$config = new CACL_config($db);
$config->load();
//$this->_caclConfig = $config;
self::$_caclConfig = $config;
$app =& JFactory::getApplication();
if (FALSE !== strpos(self::$_caclConfig->activate, $app->getName())) {
check_modules($modules);
}
}
$total = count($modules);
for ($i = 0; $i < $total; $i++) {
//determine if this is a custom module
$file = $modules[$i]->module;
$custom = substr($file, 0, 4) == 'mod_' ? 0 : 1;
$modules[$i]->user = $custom;
// CHECK: custom module name is given by the title field, otherwise it's just 'om' ??
$modules[$i]->name = $custom ? $modules[$i]->title : substr($file, 4);
$modules[$i]->style = null;
$modules[$i]->position = strtolower($modules[$i]->position);
}
return $modules;
}