/** * Use this to parse your backend page * * You will get the template located in /View/Template/{CMD}.html * You can access Cx class using $this->cx * To show messages, use \Message class * @param \Cx\Core\Html\Sigma $template Template for current CMD * @param array $cmd CMD separated by slashes */ public function parsePage(\Cx\Core\Html\Sigma $template, array $cmd) { global $_ARRAYLANG; // Parse entity view generation pages $entityClassName = $this->getNamespace() . '\\Model\\Entity\\' . current($cmd); if (in_array($entityClassName, $this->getEntityClasses())) { $this->parseEntityClassPage($template, $entityClassName, current($cmd)); return; } // Not an entity, parse overview or settings switch (current($cmd)) { case 'Settings': if (!isset($cmd[1])) { $cmd[1] = ''; } switch ($cmd[1]) { case '': default: if (!$template->blockExists('mailing')) { return; } $template->setVariable('MAILING', \Cx\Core\MailTemplate\Controller\MailTemplate::adminView($this->getName(), 'nonempty', $config['corePagingLimit'], 'settings/email')->get()); break; } break; case '': default: if ($template->blockExists('overview')) { $template->touchBlock('overview'); } break; } }