本文整理汇总了PHP中T3::detect方法的典型用法代码示例。如果您正苦于以下问题:PHP T3::detect方法的具体用法?PHP T3::detect怎么用?PHP T3::detect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类T3
的用法示例。
在下文中一共展示了T3::detect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onGetLayoutPath
/**
* Implement event onGetLayoutPath to return the layout which override by T3 & T3 templates
* This event is fired by overriding ModuleHelper class
* Return path to layout if found, false if not
*
* @param string $module The name of the module
* @param string $layout The name of the module layout. If alternative
* layout, in the form template:filename.
*
* @return null
*/
function onGetLayoutPath($module, $layout)
{
// Detect layout path in T3 themes
if (defined('T3_PLUGIN') && T3::detect()) {
T3::import('core/path');
$tPath = T3Path::getPath('html/' . $module . '/' . $layout . '.php');
if ($tPath) {
return $tPath;
}
}
return false;
}
示例2: onGetLayoutPath
/**
* Implement event onGetLayoutPath to return the layout which override by T3 & T3 templates
* This event is fired by overriding ModuleHelper class
* Return path to layout if found, false if not
*
* @param string $module The name of the module
* @param string $layout The name of the module layout. If alternative
* layout, in the form template:filename.
*
* @return null
*/
function onGetLayoutPath($module, $layout)
{
// Detect layout path in T3 themes
if (T3::detect()) {
$tPath = T3Path::getPath('html/' . $module . '/' . $layout . '.php');
if ($tPath) {
return $tPath;
}
}
return false;
}