cmsUserVars = $acymCmsUserVars; $classname = get_class($this); $viewpos = strpos($classname, 'View'); $this->name = strtolower(substr($classname, $viewpos + 4)); $this->step = acym_getVar('string', 'nextstep', ''); if (empty($this->step)) { $this->step = acym_getVar('string', 'step', ''); } $this->edition = acym_getVar('string', 'edition', '0') === '1'; } public function getName() { return $this->name; } public function getLayout() { return acym_getVar('string', 'layout', acym_getVar('string', 'task', 'listing')); } public function setLayout($value) { acym_setVar('layout', $value); } public function display($data = []) { $name = $this->getName(); $view = $this->getLayout(); $config = acym_config(); if (method_exists($this, $view)) $this->$view(); $viewFolder = acym_isAdmin() ? ACYM_VIEW : ACYM_VIEW_FRONT; if (!file_exists($viewFolder.$name.DS.'tmpl'.DS.$view.'.php')) $view = 'listing'; if ('WordPress' == 'WordPress') echo ob_get_clean(); if (!empty($_SESSION['acynotif'])) { echo implode('', $_SESSION['acynotif']); $_SESSION['acynotif'] = []; } $outsideForm = $name == 'mails' && $view == 'edit'; if ($outsideForm) echo '
'; } }