本文整理匯總了PHP中JControllerLegacy::createModel方法的典型用法代碼示例。如果您正苦於以下問題:PHP JControllerLegacy::createModel方法的具體用法?PHP JControllerLegacy::createModel怎麽用?PHP JControllerLegacy::createModel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JControllerLegacy
的用法示例。
在下文中一共展示了JControllerLegacy::createModel方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: createModel
/**
* Method to load and return a model object.
*
* @param string $name The name of the model.
* @param string $prefix Optional model prefix.
* @param array $config Configuration array for the model. Optional.
*
* @return mixed Model object on success; otherwise null failure.
*/
protected function createModel($name, $prefix = '', $config = array())
{
/*
* Use true so that we always use the Joomla db when in admin.
* otherwise if alt cnn set to default that is loaded and the fabrik tables are not found
*/
$db = FabrikWorker::getDbo(true);
$config['dbo'] = $db;
$r = parent::createModel($name, $prefix, $config);
return $r;
}