/** * @static * @param $scriptContent * @return mixed */ public static function getMinimizedScriptPath($scriptContent) { $scriptPath = PIMCORE_SYSTEM_TEMP_DIRECTORY . "/minified_javascript_core_" . md5($scriptContent) . ".js"; if (!is_file($scriptPath)) { File::put($scriptPath, $scriptContent); } $params = ["scriptPath" => "/website/var/system/", "scripts" => basename($scriptPath), "_dc" => \Pimcore\Version::getRevision()]; return "/admin/misc/script-proxy?" . array_toquerystring($params); }
/** * Returns a list of all class definitions. */ public function serverInfoAction() { $this->checkUserPermission("system_settings"); $systemSettings = \Pimcore\Config::getSystemConfig()->toArray(); $system = array("currentTime" => time(), "phpCli" => Tool\Console::getPhpCli()); $pimcoreConstants = array(); //only Pimcore_ constants -> others might break the \Zend_Encode functionality foreach ((array) get_defined_constants() as $constant => $value) { if (strpos($constant, 'PIMCORE_') === 0) { $pimcoreConstants[$constant] = $value; } } $pimcore = array("version" => \Pimcore\Version::getVersion(), "revision" => \Pimcore\Version::getRevision(), "instanceIdentifier" => $systemSettings["general"]["instanceIdentifier"], "modules" => array(), "constants" => $pimcoreConstants); foreach ((array) \Pimcore\API\Plugin\Broker::getInstance()->getModules() as $module) { $pimcore["modules"][] = get_class($module); } $plugins = \Pimcore\ExtensionManager::getPluginConfigs(); $this->encoder->encode(array("success" => true, "system" => $system, "pimcore" => $pimcore, "plugins" => $plugins)); }