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 '
'; $class = empty($config->get('small_display', 0)) ? '' : 'acym__wrapper__small'; if (acym_getVar('cmd', 'task') != 'ajaxEncoding') echo '
'; if (acym_isLeftMenuNecessary()) echo acym_getLeftMenu($name).'
'; if (!empty($data['header'])) echo $data['header']; acym_displayMessages(); echo '
'; $overridePath = acym_getPageOverride($name, $view); if (!empty($overridePath) && file_exists($overridePath)) { include $overridePath; } else { include $viewFolder.$name.DS.'tmpl'.DS.$view.'.php'; } if (acym_isLeftMenuNecessary()) echo '
'; if (acym_getVar('cmd', 'task') != 'ajaxEncoding') echo '
'; if ($outsideForm) echo '
'; } }