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); }
/** * 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); }
function __construct($view_class = null) { if ($view_class === null) { $view_class = "AdminView"; } parent::__construct($view_class); }
function __construct($view_class = null) { if ($view_class === null) { $view_class = "SiteCommentView"; } parent::__construct($view_class); }
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; }
function __construct($view_class = null) { if ($view_class === null) { $view_class = "SiteView"; } parent::__construct($view_class); $this->BaseSiteData(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Справочная система Портала"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Управление доступом пользователей"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Индивидуальные учебные планы"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Управление моделями данных"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Управление наборами шаблонов"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Личные сообщения"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Генерация кода по шаблону"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Генератор контроллеров"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { //$this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Справочник видов работ"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Управление приказами УГАТУ и кафедры"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Вопросы к ГОС экзаменам"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Класс-описатели полей"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { //$this->redirectNoAccess(); } $this->_smartyEnabled = true; $this->setPageTitle("Управление валидаторами полей"); parent::__construct(); }
public function __construct() { if (!CSession::isAuth()) { if (!in_array(CRequest::getString("action"), $this->allowedAnonymous)) { $this->redirectNoAccess(); } } $this->_smartyEnabled = true; $this->setPageTitle("Управление таблицами доступа"); parent::__construct(); }
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; }
public function __construct() { if (!CSession::isAuth()) { if (!in_array(CRequest::getString("action"), $this->allowedAnonymous)) { $this->redirectNoAccess(); } } $this->_smartyEnabled = true; $this->setPageTitle("Подсистема архивирования"); parent::__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(); }
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; }
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(); }
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); } }
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(); }
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(); }
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(); }
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(); }