Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
controller.php
1<?php
3
5
6const STATUS_COMPLETED = 'COMPLETED';
7const STATUS_PROGRESS = 'PROGRESS';
8
12abstract class Controller extends Main\Engine\Controller
13{
19 protected function processBeforeAction(Main\Engine\Action $action)
20 {
21 if (parent::processBeforeAction($action))
22 {
23 if (!Main\Loader::includeModule('translate'))
24 {
25 $this->addError(new Main\Error('Translate module not installed'));
26 }
27
28 return \count($this->getErrors()) === 0;
29 }
30
31 return true;
32 }
33
39 public function hasErrors()
40 {
41 if (!$this->errorCollection instanceof Main\ErrorCollection)
42 {
43 return false;
44 }
45
46 return !$this->errorCollection->isEmpty();
47 }
48}
static includeModule($moduleName)
Definition loader.php:69
processBeforeAction(Main\Engine\Action $action)