• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CBaseController类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中CBaseController的典型用法代码示例。如果您正苦于以下问题:PHP CBaseController类的具体用法?PHP CBaseController怎么用?PHP CBaseController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了CBaseController类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getProcessedTemplate

 private static function getProcessedTemplate($fileName, SurveyPurposeQuestion $question, CBaseController $controller, $params = array())
 {
     if (empty($params)) {
         $params = array("question" => $question);
     }
     return $controller->renderFile(static::getViewsDir() . "/{$fileName}.php", $params, true);
 }
开发者ID:shnellpavel,项目名称:bcgroup_lk,代码行数:7,代码来源:SurveyPurposeQuestionHtmlAdapter.php


示例2: renderFile

 /**
  * Renders a view file.
  * This method is required by {@link IViewRenderer}.
  * @param CBaseController $context the controller or widget who is rendering the view file.
  * @param string $sourceFile the view file path
  * @param mixed $data the data to be passed to the view
  * @param boolean $return whether the rendering result should be returned
  * @return mixed the rendering result, or null if the rendering result is not needed.
  */
 public function renderFile($context, $sourceFile, $data, $return)
 {
     if (!is_file($sourceFile) || ($file = realpath($sourceFile)) === false) {
         throw new CException(Yii::t('yii', 'View file "{file}" does not exist.', array('{file}' => $sourceFile)));
     }
     $viewFile = $this->getViewFile($sourceFile);
     if (@filemtime($sourceFile) > @filemtime($viewFile)) {
         $this->generateViewFile($sourceFile, $viewFile);
         @chmod($viewFile, $this->filePermission);
     }
     return $context->renderInternal($viewFile, $data, $return);
 }
开发者ID:charlymanja,项目名称:traceper,代码行数:21,代码来源:CViewRenderer.php


示例3: send

 public function send()
 {
     //		$this->body = (new CController('__MAIL__'))->renderPartial( Yii::app()->basePath .'application.widgets.mailSender.views.'.$this->view,$this->dataArray, true);
     $this->body = CBaseController::renderInternal(Yii::app()->basePath . '/widgets/mailSender/views/' . $this->view . '.php', $this->dataArray, true);
     $mailer = Yii::createComponent('application.extensions.mailer.EMailer');
     $mailer->From = $this->from;
     $mailer->FromName = $this->from_name;
     if (is_array($this->recipient)) {
         foreach ($this->recipient as $key => $recipient) {
             $mailer->AddAddress($recipient);
         }
     } elseif (is_string($this->recipient)) {
         $mailer->AddAddress($this->recipient);
     }
     $mailer->isHTML($this->html);
     $mailer->Subject = $this->subject;
     $mailer->Body = $this->body;
     $mailer->CharSet = 'UTF-8';
     if ($this->attachments) {
         foreach ($this->attachments as $key => $attachment) {
             $mailer->AddAttachment($attachment['file_path'], $attachment['file_name']);
         }
     }
     $result = $mailer->Send();
     return $result;
 }
开发者ID:anton-itscript,项目名称:WM-Web,代码行数:26,代码来源:mailSender.php


示例4: actionMilestonesPending

 public function actionMilestonesPending()
 {
     $Milestones = Milestones::model()->MilestoneWithPendingTasks();
     foreach ($Milestones as $milestone) {
         $Tasks = Tasks::model()->findTaskByMilestone($milestone->milestone_id);
         $str = CBaseController::renderInternal(Yii::app()->params['templatesPath'] . '/milestones/overdueMilestones.php', array('user' => $milestone->Users->completeName, 'tasks' => $Tasks, 'applicationName' => Yii::app()->name, 'applicationUrl' => "http://localhost/celestic/" . Yii::app()->request->baseUrl), true);
         $subject = Yii::t('email', 'overdueMilestone');
         Yii::import('application.extensions.phpMailer.yiiPhpMailer');
         $mailer = new yiiPhpMailer();
         $mailer->pushMail($subject, $str, array('name' => $milestone->Users->CompleteName, 'email' => $milestone->Users->user_email), Emails::PRIORITY_NORMAL);
     }
 }
开发者ID:lanzelotik,项目名称:celestic-community,代码行数:12,代码来源:BackgroundCommand.php


示例5:

 function __construct($view_class = null)
 {
     if ($view_class === null) {
         $view_class = "AdminView";
     }
     parent::__construct($view_class);
 }
开发者ID:amanai,项目名称:next24,代码行数:7,代码来源:AdminController.php


示例6:

 function __construct($view_class = null)
 {
     if ($view_class === null) {
         $view_class = "SiteView";
     }
     parent::__construct($view_class);
     $this->BaseSiteData();
 }
开发者ID:amanai,项目名称:next24,代码行数:8,代码来源:SiteController.php


示例7: __construct

 public function __construct()
 {
     if (!CSession::isAuth()) {
         $this->redirectNoAccess();
     }
     $this->_smartyEnabled = true;
     $this->setPageTitle("Справочная система Портала");
     parent::__construct();
 }
开发者ID:Rustam44,项目名称:ASUPortalPHP,代码行数:9,代码来源:CHelpController.class.php


示例8: __construct

 public function __construct()
 {
     if (!CSession::isAuth()) {
         //$this->redirectNoAccess();
     }
     $this->_smartyEnabled = true;
     $this->setPageTitle("Справочник видов работ");
     parent::__construct();
 }
开发者ID:Rustam44,项目名称:ASUPortalPHP,代码行数:9,代码来源:CIndPlanWorkTypesController.class.php


示例9: __construct

 public function __construct()
 {
     if (!CSession::isAuth()) {
         if (!in_array(CRequest::getString("action"), $this->allowedAnonymous)) {
             $this->redirectNoAccess();
         }
     }
     $this->_smartyEnabled = true;
     $this->setPageTitle("Управление таблицами доступа");
     parent::__construct();
 }
开发者ID:Rustam44,项目名称:ASUPortalPHP,代码行数:11,代码来源:CACLTableController.class.php


示例10: widget

 public function widget($className, $name, $params = array())
 {
     if (!array_key_exists($className, $this->widgets)) {
         $this->widgets[$className] = array();
     }
     /** @var \PetrGrishin\Widget\Widget $widget */
     $widget = $this->context->createWidget($className, $params);
     $widget->setName($name);
     $this->widgets[$className][] = $widget;
     return $widget;
 }
开发者ID:petrgrishin,项目名称:yii-view,代码行数:11,代码来源:View.php


示例11: __construct

 public function __construct()
 {
     if (!CSession::isAuth()) {
         $this->redirectNoAccess();
     }
     if (CSession::getCurrentUser()->getLevelForCurrentTask() == ACCESS_LEVEL_NO_ACCESS) {
         $this->redirectNoAccess();
     }
     $this->_smartyEnabled = true;
     $this->setPageTitle("Учебная нагрузка");
     parent::__construct();
 }
开发者ID:Rustam44,项目名称:ASUPortalPHP,代码行数:12,代码来源:CIndPlanLoadController.class.php


示例12: __construct

 public function __construct()
 {
     parent::__construct();
     // Initializing of page
     $this->load->model('Page_model');
     $this->data = $this->Page_model->GetPageContent($this->cPageName, 'general', false);
     // All categories for top header and right column
     $this->data->aCategories = $this->Page_model->GetAllCategories();
     $this->cTitle = $this->data->pages_title;
     $this->cDescription = $this->data->pages_description;
     $this->cKeywords = $this->data->pages_keywords;
 }
开发者ID:Lynxiel,项目名称:elektrika-full,代码行数:12,代码来源:cpagecontroller.php


示例13: __construct

 public function __construct()
 {
     if (!CSession::isAuth()) {
         if (!in_array(CRequest::getString("action"), $this->allowedAnonymous)) {
             $this->redirectNoAccess();
         }
     }
     $this->_smartyEnabled = true;
     $this->setPageTitle("Учебные группы студентов");
     $this->_useDojo = true;
     parent::__construct();
 }
开发者ID:Rustam44,项目名称:ASUPortalPHP,代码行数:12,代码来源:CStudentGroupsController.class.php


示例14: __construct

 public function __construct()
 {
     if (!CSession::isAuth()) {
         $action = CRequest::getString("action");
         if ($action == "") {
             $action = "index";
         }
         if (!in_array($action, $this->allowedAnonymous)) {
             $this->redirectNoAccess();
         }
     }
     $this->_smartyEnabled = true;
     $this->setPageTitle("Управление сотрудниками кафедры");
     parent::__construct();
 }
开发者ID:Rustam44,项目名称:ASUPortalPHP,代码行数:15,代码来源:CStaffController.class.php


示例15: __construct

 public function __construct()
 {
     if (!CSession::isAuth()) {
         $action = CRequest::getString("action");
         if ($action == "") {
             $action = "index";
         }
         if (!in_array(CRequest::getString("action"), $this->allowedAnonymous)) {
             $this->redirectNoAccess();
         }
     }
     $this->_smartyEnabled = true;
     $this->setPageTitle("Предзащита ВКР - студенты");
     parent::__construct();
 }
开发者ID:Rustam44,项目名称:ASUPortalPHP,代码行数:15,代码来源:CDiplomPreviewController.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CBdd类代码示例发布时间:2022-05-23
下一篇:
PHP CBaseActiveRelation类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap