public function getReport() { // quick and dirty: use same data as for the web $tpl = sysInfoTools::eZTemplateFactory(); $tpl->setVariable('title', 'Content Classes Report'); $htmlReport = $tpl->fetch("design:sysinfo/classesreport.tpl"); return $htmlReport; }
public function getReport() { // quick and dirty: use same data as for the web $tpl = sysInfoTools::eZTemplateFactory(); $tpl->setVariable('title', 'Roles & Policies Report'); $tpl->setVariable('roles', self::getRoles()); $htmlReport = $tpl->fetch("design:sysinfo/policiesreport.tpl"); return $htmlReport; }
public function getReport() { // quick and dirty: use same data as for the web $tpl = sysInfoTools::eZTemplateFactory(); $tpl->setVariable('title', 'Workflows Report'); $workflows = eZWorkflow::fetchList(); $triggers = eZTrigger::fetchList(); $tpl->setVariable('workflows', $workflows); $tpl->setVariable('triggers', $triggers); $htmlReport = $tpl->fetch("design:sysinfo/workflowsreport.tpl"); return $htmlReport; }
protected static function initialize($force = false) { if (self::$initialized && !$force) { return; } self::$originaltpls = array(); $knowndirs = array('design'); foreach ($knowndirs as $phpdir) { self::$originaltpls = array_merge(self::$originaltpls, self::scanDirFortpls($phpdir, true)); } self::$extensiontpls = array(); $extensionsdir = eZExtension::baseDirectory(); $ini = eZINI::instance('design.ini'); /// @todo take this from an ini too, to allow user to add more known php files dirs foreach ($ini->variable('ExtensionSettings', 'DesignExtensions') as $extdir) { self::$extensiontpls = array_merge(self::$extensiontpls, self::scanDirFortpls("{$extensionsdir}/{$extdir}/design", true)); } self::$tpl = sysInfoTools::eZTemplateFactory(); self::$initialized = true; }
/// @var eZModule $module $module = $Params['Module']; $view = $module->currentView(); // rely on system policy instead of creating our own, but allow also PolicyOmitList for single views // (useful f.e. for system status checks from tools which can not authenticate because they are too simple). // Also allow the clusterhelper view to do its auth and then run this view. $ini = eZINI::instance(); if (!in_array("sysinfo/{$view}", $ini->variable('RoleSettings', 'PolicyOmitList')) && ezSysinfoClusterManager::getAuthStatus() !== true) { $user = eZUser::currentUser(); $access = $user->hasAccessTo('setup', 'system_info'); if ($access['accessWord'] != 'yes') { return $module->handleError(eZError::KERNEL_ACCESS_DENIED, 'kernel'); } } $isClusterSlaveRequest = ezSysinfoClusterManager::isClusterSlaveRequest($Params); $tpl = sysInfoTools::eZTemplateFactory(); if ($isClusterSlaveRequest) { // for requests which 'come from cluster', remove titles $tpl->setVariable('title', ''); $tpl->setVariable('description', ''); $tpl->setVariable('cluster_request', true); } else { $tpl->setVariable('title', ezSysinfoModule::viewTitle($view)); $tpl->setVariable('description', ezSysinfoModule::viewDescription($view)); $tpl->setVariable('cluster_request', false); } // value to these vars can be set by the view code to alter response $extra_path = ''; $response_type = ''; $response_data = null; $executionResult = (include "extension/ggsysinfo/modules/sysinfo/{$view}.php");