本文整理汇总了PHP中theme_config::update_legacy_information方法的典型用法代码示例。如果您正苦于以下问题:PHP theme_config::update_legacy_information方法的具体用法?PHP theme_config::update_legacy_information怎么用?PHP theme_config::update_legacy_information使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类theme_config
的用法示例。
在下文中一共展示了theme_config::update_legacy_information方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load
/**
* Load the config.php file for a particular theme, and return an instance
* of this class. (That is, this is a factory method.)
*
* @param string $themename the name of the theme.
* @return theme_config an instance of this class.
*/
public static function load($themename)
{
global $CFG;
// We have to use the variable name $THEME (upper case) because that
// is what is used in theme config.php files.
// Set some other standard properties of the theme.
$THEME = new theme_config();
$THEME->name = $themename;
$THEME->dir = $CFG->themedir . '/' . $themename;
// Load up the theme config
$configfile = $THEME->dir . '/config.php';
if (!is_readable($configfile)) {
throw new coding_exception('Cannot use theme ' . $themename . '. The file ' . $configfile . ' does not exist or is not readable.');
}
include $configfile;
$THEME->update_legacy_information();
return $THEME;
}