本文整理匯總了PHP中CModel::loadData方法的典型用法代碼示例。如果您正苦於以下問題:PHP CModel::loadData方法的具體用法?PHP CModel::loadData怎麽用?PHP CModel::loadData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CModel
的用法示例。
在下文中一共展示了CModel::loadData方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: 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));
}