本文整理汇总了PHP中ModUtil::getModules方法的典型用法代码示例。如果您正苦于以下问题:PHP ModUtil::getModules方法的具体用法?PHP ModUtil::getModules怎么用?PHP ModUtil::getModules使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModUtil
的用法示例。
在下文中一共展示了ModUtil::getModules方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: upgradecontenttypes
/**
* perform a ContentType upgrade on all modules
* @param string $modname (optional and unused at the moment)
*/
public function upgradecontenttypes($modname = null)
{
if ($modname == null) {
$modules = ModUtil::getModules();
$count = 0;
foreach ($modules as $module) {
// there is no need to upgrade Content ContentTypes because they are done on module upgrade.
if ($module['name'] != 'Content') {
$count += Content_Installer::updateContentType($module['name']);
}
}
} else {
$count = Content_Installer::updateContentType($modname);
}
return $count;
}
示例2: handler
/**
* Event handler here.
*
* @param GenericEvent $event Event handler.
*
* @return void
*/
public function handler(GenericEvent $event)
{
// check if this is for this handler
$subject = $event->getSubject();
if (!($event['method'] == 'extensions' && $subject instanceof \Users\Controller\AdminController)) {
return;
}
if (!SecurityUtil::checkPermission('Users::', '::', ACCESS_ADMIN)) {
throw new \Zikula\Framework\Exception\ForbiddenException();
}
// Zikula Modules and Themes versions
$view = Zikula_View::getInstance('Users');
$view->assign('mods', ModUtil::getModules());
$view->assign('themes', ThemeUtil::getAllThemes());
$event->setData($view->fetch('users_admin_extensions.tpl'));
$event->stopPropagation();
}
示例3: getModules
/**
* Generic modules select function. Only modules in the module
* table are returned which means that new/unscanned modules
* will not be returned
*
* @deprecated
* @see ModUtil::getModules()
*
* @param where The where clause to use for the select
* @param sort The sort to use
*
* @return The resulting module object array
*/
public static function getModules ($where='', $sort='displayname')
{
LogUtil::log(__f('Warning! Function %1$s is deprecated. Please use %2$s instead.', array(__CLASS__ . '#' . __FUNCTION__, 'ModUtil::getModules()')), E_USER_DEPRECATED);
return ModUtil::getModules($where, $sort);
}