当前位置: 首页>>代码示例>>PHP>>正文


PHP CModel::setTableModelClassName方法代码示例

本文整理汇总了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));
 }
开发者ID:andrelinoge,项目名称:rezydent,代码行数:20,代码来源:CreateAction.php

示例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));
 }
开发者ID:andrelinoge,项目名称:rezydent,代码行数:20,代码来源:UpdateAction.php


注:本文中的CModel::setTableModelClassName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。