当前位置: 首页>>代码示例>>PHP>>正文


PHP Setting::show方法代码示例

本文整理汇总了PHP中Cx\Core\Setting\Controller\Setting::show方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::show方法的具体用法?PHP Setting::show怎么用?PHP Setting::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Cx\Core\Setting\Controller\Setting的用法示例。


在下文中一共展示了Setting::show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: parsePage

 /**
  * 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
  * @global array $_ARRAYLANG Language data
  */
 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':
             \Cx\Core\Setting\Controller\Setting::init('Wysiwyg', 'config', 'Yaml');
             if (isset($_POST) && isset($_POST['bsubmit'])) {
                 \Cx\Core\Setting\Controller\Setting::set('specificStylesheet', isset($_POST['specificStylesheet']) ? 1 : 0);
                 \Cx\Core\Setting\Controller\Setting::set('replaceActualContents', isset($_POST['replaceActualContents']) ? 1 : 0);
                 \Cx\Core\Setting\Controller\Setting::storeFromPost();
             }
             $i = 0;
             if (!\Cx\Core\Setting\Controller\Setting::isDefined('specificStylesheet') && !\Cx\Core\Setting\Controller\Setting::add('specificStylesheet', '0', ++$i, \Cx\Core\Setting\Controller\Setting::TYPE_CHECKBOX, '1', 'config')) {
                 throw new \Exception("Failed to add new configuration option");
             }
             if (!\Cx\Core\Setting\Controller\Setting::isDefined('replaceActualContents') && !\Cx\Core\Setting\Controller\Setting::add('replaceActualContents', '0', ++$i, \Cx\Core\Setting\Controller\Setting::TYPE_CHECKBOX, '1', 'config')) {
                 throw new \Exception("Failed to add new configuration option");
             }
             $tmpl = new \Cx\Core\Html\Sigma();
             \Cx\Core\Setting\Controller\Setting::show($tmpl, 'index.php?cmd=Config&act=Wysiwyg&tpl=Settings', $_ARRAYLANG['TXT_CORE_WYSIWYG'], $_ARRAYLANG['TXT_CORE_WYSIWYG_ACT_SETTINGS'], 'TXT_CORE_WYSIWYG_');
             $template->setVariable('WYSIWYG_CONFIG_TEMPLATE', $tmpl->get());
             break;
         case '':
         default:
             if ($template->blockExists('overview')) {
                 $template->touchBlock('overview');
             }
             break;
     }
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:47,代码来源:BackendController.class.php

示例2: showSettings

 /**
  * Set the cms system settings
  * @global  ADONewConnection
  * @global  array   Core language
  * @global  \Cx\Core\Html\Sigma
  */
 function showSettings()
 {
     global $objTemplate, $_ARRAYLANG;
     $template = new \Cx\Core\Html\Sigma();
     $objTemplate->addBlockfile('ADMIN_CONTENT', 'settings_system', 'settings.html');
     $templateObj = new \Cx\Core\Html\Sigma(ASCMS_CORE_PATH . '/Config/View/Template/Backend');
     $templateObj->loadTemplateFile('development_tools.html');
     $templateObj->setVariable(array('TXT_TITLE_SET5' => $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'], 'TXT_DEBUGGING_STATUS' => $_ARRAYLANG['TXT_DEBUGGING_STATUS'], 'TXT_DEBUGGING_FLAGS' => $_ARRAYLANG['TXT_DEBUGGING_FLAGS'], 'TXT_SETTINGS_DEBUGGING_FLAG_LOG' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG'], 'TXT_SETTINGS_DEBUGGING_FLAG_PHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_PHP'], 'TXT_SETTINGS_DEBUGGING_FLAG_DB' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB'], 'TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE'], 'TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE'], 'TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR'], 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE'], 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP'], 'TXT_DEBUGGING_EXPLANATION' => $_ARRAYLANG['TXT_DEBUGGING_EXPLANATION'], 'TXT_SAVE_CHANGES' => $_ARRAYLANG['TXT_SAVE'], 'TXT_RADIO_ON' => $_ARRAYLANG['TXT_ACTIVATED'], 'TXT_RADIO_OFF' => $_ARRAYLANG['TXT_DEACTIVATED']));
     if (in_array('SystemInfo', \Env::get('cx')->getLicense()->getLegalComponentsList())) {
         if (isset($_POST['debugging'])) {
             $this->updateDebugSettings($_POST['debugging']);
         }
         $this->setDebuggingVariables($templateObj);
     }
     \Cx\Core\Setting\Controller\Setting::init('Config', null, 'Yaml', null, \Cx\Core\Setting\Controller\Setting::REPOPULATE);
     \Cx\Core\Setting\Controller\Setting::storeFromPost();
     \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'site');
     \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', $_ARRAYLANG['TXT_CORE_CONFIG_SITE'], $_ARRAYLANG['TXT_CORE_CONFIG_SITE'], 'TXT_CORE_CONFIG_', !$this->isWritable());
     \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'contactInformation');
     \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'], $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'], 'TXT_CORE_CONFIG_', !$this->isWritable());
     \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'administrationArea');
     \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], 'TXT_CORE_CONFIG_', !$this->isWritable());
     \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'security');
     \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'], $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'], 'TXT_CORE_CONFIG_', !$this->isWritable());
     if (in_array('SystemInfo', \Env::get('cx')->getLicense()->getLegalComponentsList())) {
         \Cx\Core\Setting\Controller\Setting::show_external($template, $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'], $templateObj->get());
     }
     \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'otherConfigurations');
     \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'], $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'], 'TXT_CORE_CONFIG_', !$this->isWritable());
     // show also hidden settins
     if (in_array('SystemInfo', \Env::get('cx')->getLicense()->getLegalComponentsList()) && \Permission::hasAllAccess() && isset($_GET['all'])) {
         \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'core');
         \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', 'CORE', 'CORE', 'TXT_CORE_CONFIG_', true);
         \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'release');
         \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', 'RELEASE', 'RELEASE', 'TXT_CORE_CONFIG_', true);
         \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'component');
         \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', 'COMPONENT', 'COMPONENT', 'TXT_CORE_CONFIG_', !$this->isWritable());
         \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'license');
         \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', 'LICENSE', 'LICENSE', 'TXT_CORE_CONFIG_', true);
         \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'cache');
         \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', 'CACHE', 'CACHE', 'TXT_CORE_CONFIG_', true);
     }
     $this->checkFtpAccess();
     $objTemplate->setVariable('SETTINGS_TABLE', $template->get());
     $objTemplate->parse('settings_system');
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:52,代码来源:Config.class.php

示例3: settings

 /**
  * Sets up the Country settings page
  * @return  string          The page content
  */
 static function settings()
 {
     global $_CORELANG;
     $objTemplateCountry = new \Cx\Core\Html\Sigma(\Env::get('cx')->getCodeBaseCorePath() . '/Country/View/Template/Generic');
     $objTemplateCountry->loadTemplateFile('Overview.html');
     // Adds messages
     self::storeSettings();
     self::storeFromPost();
     $uri = \Html::getRelativeUri();
     // Let all links in this tab point here again
     \Html::replaceUriParameter($uri, 'active_tab=' . \Cx\Core\Setting\Controller\Setting::tab_index());
     // Create a copy of the URI for the Paging, as this is passed by
     // reference and modified
     $uri_paging = $uri;
     //DBG::log("URI: $uri");
     $objSorting = new Sorting($uri, array('id' => $_CORELANG['TXT_CORE_COUNTRY_ID'], 'active' => $_CORELANG['TXT_CORE_COUNTRY_ACTIVE'], 'ord' => $_CORELANG['TXT_CORE_COUNTRY_ORD'], 'name' => $_CORELANG['TXT_CORE_COUNTRY_NAME'], 'alpha2' => $_CORELANG['TXT_CORE_COUNTRY_ISO2'], 'alpha3' => $_CORELANG['TXT_CORE_COUNTRY_ISO3']), true, 'order_country');
     \Cx\Core\Setting\Controller\Setting::init('core', 'country');
     $limit = \Cx\Core\Setting\Controller\Setting::getValue('numof_countries_per_page_backend', 'core');
     $count = 0;
     $arrCountries = self::getArray($count, null, $limit, \Paging::getPosition(), $objSorting->getOrder());
     if ($arrCountries === false) {
         return \Message::error($_CORELANG['TXT_CORE_COUNTRY_ERROR_INITIALIZING']);
     }
     $objTemplateCountry->setGlobalVariable($_CORELANG + array('CORE_COUNTRY' => $_CORELANG['TXT_CORE_COUNTRY'] . ' ' . sprintf($_CORELANG['TXT_CORE_TOTAL'], $count), 'HEAD_SETTINGS_COUNTRY_ID' => $objSorting->getHeaderForField('id'), 'HEAD_SETTINGS_COUNTRY_ACTIVE' => $objSorting->getHeaderForField('active'), 'HEAD_SETTINGS_COUNTRY_ORD' => $objSorting->getHeaderForField('ord'), 'HEAD_SETTINGS_COUNTRY_NAME' => $objSorting->getHeaderForField('name'), 'HEAD_SETTINGS_COUNTRY_ISO2' => $objSorting->getHeaderForField('alpha2'), 'HEAD_SETTINGS_COUNTRY_ISO3' => $objSorting->getHeaderForField('alpha3'), 'CORE_SETTING_TAB_INDEX' => \Cx\Core\Setting\Controller\Setting::tab_index(), 'SETTINGS_COUNTRY_PAGING' => \Paging::get($uri_paging, '', $count, $limit, true)));
     // Note:  Optionally disable the block 'settings_country_submit'
     // to disable storing changes
     $i = 0;
     foreach ($arrCountries as $country_id => $arrCountry) {
         $objTemplateCountry->setVariable(array('SETTINGS_COUNTRY_ROWCLASS' => ++$i % 2 + 1, 'SETTINGS_COUNTRY_ID' => $country_id, 'SETTINGS_COUNTRY_ACTIVE' => $arrCountry['active'] ? \Html::ATTRIBUTE_CHECKED : '', 'SETTINGS_COUNTRY_ORD' => $arrCountry['ord'], 'SETTINGS_COUNTRY_NAME' => $arrCountry['name'], 'SETTINGS_COUNTRY_ISO2' => $arrCountry['alpha2'], 'SETTINGS_COUNTRY_ISO3' => $arrCountry['alpha3'], 'SETTINGS_FUNCTIONS' => \Html::getBackendFunctions(array('delete' => 'delete_country_id=' . $country_id), array('delete' => $_CORELANG['TXT_CORE_COUNTRY_CONFIRM_DELETE'] . "\\n" . $_CORELANG['TXT_ACTION_IS_IRREVERSIBLE']))));
         $objTemplateCountry->parse('settings_country_row');
     }
     $objTemplateSetting = null;
     \Cx\Core\Setting\Controller\Setting::show_external($objTemplateSetting, $_CORELANG['TXT_CORE_COUNTRY_EDIT'], $objTemplateCountry->get());
     \Cx\Core\Setting\Controller\Setting::show($objTemplateSetting, $uri, $_CORELANG['TXT_CORE_COUNTRY_SETTINGS'], $_CORELANG['TXT_CORE_COUNTRY_SETTINGS']);
     return $objTemplateSetting->get();
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:40,代码来源:Country.class.php

示例4: showOverview

 /**
  * Display GeoIp settings
  */
 public function showOverview()
 {
     global $_ARRAYLANG;
     //save the setting values
     if (isset($_POST['bsubmit'])) {
         \Cx\Core\Setting\Controller\Setting::storeFromPost();
     }
     //display the setting options
     \Cx\Core\Setting\Controller\Setting::init('GeoIp', null, 'Yaml');
     \Cx\Core\Setting\Controller\Setting::setEngineType('GeoIp', 'Yaml', 'config');
     \Cx\Core\Setting\Controller\Setting::show($this->template, 'index.php?cmd=GeoIp', $_ARRAYLANG['TXT_CORE_MODULE_GEOIP'], $_ARRAYLANG['TXT_CORE_MODULE_GEOIP_SETTINGS'], 'TXT_CORE_MODULE_GEOIP_');
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:15,代码来源:BackendController.class.php


注:本文中的Cx\Core\Setting\Controller\Setting::show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。