本文整理汇总了PHP中CModel::setTableModelClassName方法的典型用法代码示例。如果您正苦于以下问题:PHP CModel::setTableModelClassName方法的具体用法?PHP CModel::setTableModelClassName怎么用?PHP CModel::setTableModelClassName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CModel
的用法示例。
在下文中一共展示了CModel::setTableModelClassName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: runMultilingual
/**
* For multilingual site mode
*/
public function runMultilingual()
{
// check if action is configured
$this->checkConditions(array('model', 'tableModelClassName'));
/** @var $controller BackendController */
$controller = $this->getController();
if ($this->redirectUrl) {
$controller->setRedirectUrl($this->redirectUrl);
}
$controller->setModel($this->model);
if (isPostOrAjaxRequest()) {
// in case of multilingual site we will use form model to gather data and save to data storage (DB)
$this->model->setTableModelClassName($this->tableModelClassName);
$controller->processCreate();
}
$controller->render($this->view, array('model' => $controller->getModel(), 'pageTitle' => $this->pageTitle, 'formId' => $this->formId, 'formView' => $this->formView, 'formAction' => $this->formAction, 'innerLinks' => $this->innerLinks, 'imageUploadHandlerUrl' => $this->imageUploadHandlerUrl, 'coverPreviewWidth' => $this->coverPreviewWidth, 'coverPreviewHeight' => $this->coverPreviewHeight));
}
示例2: runMultilingual
/**
* For multilingual site mode
*/
public function runMultilingual()
{
// check if action is configured
$this->checkConditions(array('model', 'updateRecordId', 'tableModelClassName'));
/** @var $controller BackendController */
$controller = $this->getController();
$this->model->setTableModelClassName($this->tableModelClassName);
$this->model->loadData($this->updateRecordId);
if ($this->redirectUrl) {
$controller->setRedirectUrl($this->redirectUrl);
}
$controller->setModel($this->model);
if (isPostOrAjaxRequest()) {
$controller->processUpdate();
}
$controller->render($this->view, array('model' => $controller->getModel(), 'pageTitle' => $this->pageTitle, 'formId' => $this->formId, 'formView' => $this->formView, 'formAction' => $this->formAction, 'imageUploadHandlerUrl' => $this->imageUploadHandlerUrl, 'coverPreviewWidth' => $this->coverPreviewWidth, 'coverPreviewHeight' => $this->coverPreviewHeight));
}