本文整理汇总了PHP中FabrikWorker::isViewType方法的典型用法代码示例。如果您正苦于以下问题:PHP FabrikWorker::isViewType方法的具体用法?PHP FabrikWorker::isViewType怎么用?PHP FabrikWorker::isViewType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FabrikWorker
的用法示例。
在下文中一共展示了FabrikWorker::isViewType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generalIncludes
/**
* Load the required fabrik files
*
* @param string $view view name
*
* @return void
*/
protected function generalIncludes($view)
{
if ($view == 'details') {
$view = 'form';
}
if (!FabrikWorker::isViewType($view)) {
throw new RuntimeException('Please specify a valid view type in your fabrik {} code: ' . $view, 500);
}
require_once COM_FABRIK_FRONTEND . '/controller.php';
// If in admin form or details view and embedding a list - this gave an error - if only needed for 3.0.x
if ($view !== 'list') {
require_once COM_FABRIK_FRONTEND . '/controllers/form.php';
require_once COM_FABRIK_FRONTEND . '/controllers/details.php';
}
require_once COM_FABRIK_FRONTEND . '/controllers/package.php';
require_once COM_FABRIK_FRONTEND . '/controllers/list.php';
require_once COM_FABRIK_FRONTEND . '/controllers/visualization.php';
JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_fabrik/tables');
JModelLegacy::addIncludePath(COM_FABRIK_FRONTEND . '/models');
JModelLegacy::addIncludePath(COM_FABRIK_FRONTEND . '/models', 'FabrikFEModel');
// $$$rob looks like including the view does something to the layout variable
require_once COM_FABRIK_FRONTEND . '/views/' . $view . '/view.html.php';
}