35 public $accessNeedLoggedUser =
true;
41 public $accessRight =
false;
47 public $controllerStatus =
true;
67 global $db, $hookmanager;
72 $hookmanager->initHooks(array(
'webportalpage',
'webportal'));
85 return ($resHook < 0 ? -1 : 1);
97 if ($this->accessNeedLoggedUser) {
98 if (!$context->userIslog()) {
103 if (!$this->accessRight) {
123 if (!$context->controller_found) {
155 $parameters[
'controller'] = $context->controller;
157 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $context, $context->action);
159 $context->setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
178 $parameters[
'controller'] = $context->controller;
180 $reshook = $hookmanager->executeHooks(
'PrintPageView', $parameters, $context, $context->action);
182 $context->setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
197 global $conf, $langs, $hookmanager, $db;
201 if (!preg_match(
'/^[0-9\.A-ZaZ_\-]*$/ui', $templateName)) {
205 if (!empty($this->tplPath)) {
206 $tplPath = $this->tplPath .
'/' . $templateName .
'.tpl.php';
207 if (file_exists($tplPath)) {
213 $tplPath = $context->tplPath .
'/' . $templateName .
'.tpl.php';
215 if (!file_exists($tplPath)) {
216 print
'ERROR TPL NOT FOUND : ' . $templateName;
static getInstance()
Singleton method to create one instance of this object.
hookPrintPageView($parameters=array())
Execute hook PrintPageView.
action()
Action method is called before html output can be used to manage security and change context.
display404()
Display error template.
__construct()
Constructor.
hookDoAction($parameters=array())
Execute hook doActions.
loadTemplate($templateName, $vars=false)
Load a template .tpl file.
checkAccess()
Check current access to controller.