本文整理汇总了PHP中Cx\Core\Setting\Controller\Setting::getValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::getValue方法的具体用法?PHP Setting::getValue怎么用?PHP Setting::getValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cx\Core\Setting\Controller\Setting
的用法示例。
在下文中一共展示了Setting::getValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preResolve
/**
* Sets the user's and the database timezone
* @param \Cx\Core\Routing\Url $request Request URL
*/
public function preResolve(\Cx\Core\Routing\Url $request)
{
$databaseTimezoneString = $this->cx->getDb()->getDb()->getTimezone();
$this->databaseTimezone = new \DateTimeZone($databaseTimezoneString);
$internalTimezoneString = \Cx\Core\Setting\Controller\Setting::getValue('timezone', 'Config');
$this->internalTimezone = new \DateTimeZone($internalTimezoneString);
$this->userTimezone = \FWUser::getFWUserObject()->objUser->getTimezone();
}
示例2: preContentLoad
/**
* Do something before content is loaded from DB
*
* @param \Cx\Core\ContentManager\Model\Entity\Page $page The resolved page
*/
public function preContentLoad(\Cx\Core\ContentManager\Model\Entity\Page $page)
{
global $_CONFIG, $cl, $lang, $objInit, $dataBlocks, $lang, $dataBlocks, $themesPages, $page_template;
// Initialize counter and track search engine robot
\Cx\Core\Setting\Controller\Setting::init('Config', 'component', 'Yaml');
if (\Cx\Core\Setting\Controller\Setting::getValue('dataUseModule') && $cl->loadFile(ASCMS_MODULE_PATH . '/Data/Controller/DataBlocks.class.php')) {
$lang = $objInit->loadLanguageData('Data');
$dataBlocks = new \Cx\Modules\Data\Controller\DataBlocks($lang);
\Env::get('cx')->getPage()->setContent($dataBlocks->replace(\Env::get('cx')->getPage()->getContent()));
$themesPages = $dataBlocks->replace($themesPages);
$page_template = $dataBlocks->replace($page_template);
}
}
示例3: __construct
/**
* Constructor for PHP5
*
* @param int $lang
*/
function __construct()
{
global $objInit;
\Cx\Core\Setting\Controller\Setting::init('Config', 'component', 'Yaml');
if (\Cx\Core\Setting\Controller\Setting::getValue('dataUseModule')) {
$this->active = true;
} else {
return;
}
$this->_arrSettings = $this->createSettingsArray();
$this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_THEMES_PATH);
\Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
$this->langVars = $objInit->loadLanguageData('Data');
}
示例4: postContentLoad
/**
* Do something after content is loaded from DB
*
* @param \Cx\Core\ContentManager\Model\Entity\Page $page The resolved page
*/
public function postContentLoad(\Cx\Core\ContentManager\Model\Entity\Page $page)
{
switch ($this->cx->getMode()) {
case \Cx\Core\Core\Controller\Cx::MODE_FRONTEND:
// Show the Shop navbar in the Shop, or on every page if configured to do so
if (!Shop::isInitialized()) {
\Cx\Core\Setting\Controller\Setting::init('Shop', 'config');
if (\Cx\Core\Setting\Controller\Setting::getValue('shopnavbar_on_all_pages', 'Shop')) {
Shop::init();
Shop::setNavbar();
}
}
break;
}
}
示例5: getProviders
/**
* Gets all the providers from the setting db.
*
* @static
* @return array the providers and their data
*/
public static function getProviders()
{
\Cx\Core\Setting\Controller\Setting::init('Access', 'sociallogin');
$settingProviders = json_decode(\Cx\Core\Setting\Controller\Setting::getValue('providers', 'Access'));
foreach ($settingProviders as $providerName => $providerData) {
$class = self::getClassByProvider($providerName);
if ($class != null) {
$oauthProvider = new $class();
$oauthProvider->setApplicationData($providerData->settings);
$oauthProvider->setActive(isset($providerData->active) ? $providerData->active : false);
self::$providers[$providerName] = $oauthProvider;
}
}
return self::$providers;
}
示例6: postInit
/**
* postInit
*
* @param \Cx\Core\Core\Controller\Cx $cx
*
* @return null
*/
public function postInit(\Cx\Core\Core\Controller\Cx $cx)
{
$componentController = $this->getComponent('MultiSite');
if (!$componentController) {
return;
}
\Cx\Core\Setting\Controller\Setting::init('MultiSite', 'config', 'FileSystem');
if (\Cx\Core\Setting\Controller\Setting::getValue('mode', 'MultiSite') != \Cx\Core_Modules\MultiSite\Controller\ComponentController::MODE_WEBSITE) {
return;
}
$updateFile = $cx->getWebsiteTempPath() . '/Update/' . \Cx\Core_Modules\Update\Model\Repository\DeltaRepository::PENDING_DB_UPDATES_YML;
if (!file_exists($updateFile)) {
return;
}
$componentController->setCustomerPanelDomainAsMainDomain();
$updateController = $this->getController('Update');
$updateController->applyDelta();
}
示例7: showFeedBackForm
/**
* FeedBack Form
*
* @global array $_ARRAYLANG
*/
public function showFeedBackForm()
{
global $_ARRAYLANG;
$objUser = \FWUser::getFWUserObject();
//feed back types
$feedBackTypes = array($_ARRAYLANG['TXT_SUPPORT_FEEDBACK_SELECT_FEEDBACK'], $_ARRAYLANG['TXT_SUPPORT_FEEDBACK_BUG_REPORT'], $_ARRAYLANG['TXT_SUPPORT_FEEDBACK_FEATURE_REQUEST'], $_ARRAYLANG['TXT_SUPPORT_FEEDBACK_HAVE_QUESTION']);
\Cx\Core\Setting\Controller\Setting::init('Support', 'setup', 'Yaml');
$faqUrl = \Cx\Core\Setting\Controller\Setting::getValue('faqUrl', 'Support');
$recipientMailAddress = \Cx\Core\Setting\Controller\Setting::getValue('recipientMailAddress', 'Support');
$faqLink = '<a target="_blank" title="click to FAQ page" href=' . $faqUrl . '>' . $_ARRAYLANG['TXT_SUPPORT_FEEDBACK_FAQ'] . '</a>';
//Get License information
$license = \Env::get('cx')->getLicense();
$licenseName = $license->getEditionName();
$licenseValid = date(ASCMS_DATE_FORMAT_DATE, $license->getValidToDate());
$licenseVersion = $license->getVersion()->getNumber();
//get the input datas
$feedBackType = isset($_POST['feedBackType']) ? contrexx_input2raw($_POST['feedBackType']) : '';
$feedBackSubject = isset($_POST['feedBackSubject']) ? contrexx_input2raw($_POST['feedBackSubject']) : '';
$feedBackComment = isset($_POST['feedBackComment']) ? contrexx_input2raw($_POST['feedBackComment']) : '';
$customerName = isset($_POST['customerName']) ? contrexx_input2raw($_POST['customerName']) : '';
$customerEmailId = isset($_POST['customerEmailId']) ? contrexx_input2raw($_POST['customerEmailId']) : '';
$feedBackUrl = isset($_POST['feedBackUrl']) ? contrexx_input2raw($_POST['feedBackUrl']) : '';
if (isset($_POST['sendAndSave'])) {
if (!empty($feedBackSubject) && !empty($feedBackComment)) {
//get the hostname domain
$domainRepo = new \Cx\Core\Net\Model\Repository\DomainRepository();
$domain = $domainRepo->findOneBy(array('id' => 0));
$arrFields = array('name' => contrexx_raw2xhtml($customerName), 'fromEmail' => contrexx_raw2xhtml($customerEmailId), 'feedBackType' => $feedBackType != 0 ? contrexx_raw2xhtml($feedBackTypes[$feedBackType]) : '', 'url' => $faqUrl, 'comments' => contrexx_raw2xhtml($feedBackComment), 'subject' => contrexx_raw2xhtml($feedBackSubject), 'firstName' => $objUser->objUser->getProfileAttribute('firstname'), 'lastName' => $objUser->objUser->getProfileAttribute('lastname'), 'phone' => !$objUser->objUser->getProfileAttribute('phone_office') ? $objUser->objUser->getProfileAttribute('phone_mobile') : $objUser->objUser->getProfileAttribute('phone_office'), 'company' => $objUser->objUser->getProfileAttribute('company'), 'toEmail' => $recipientMailAddress, 'licenseName' => $licenseName, 'licenseValid' => $licenseValid, 'licenseVersion' => $licenseVersion, 'domainName' => $domain ? $domain->getName() : '');
//send the feedBack mail
$this->sendMail($arrFields) ? \Message::ok($_ARRAYLANG['TXT_SUPPORT_FEEDBACK_EMAIL_SEND_SUCESSFULLY']) : \Message::error($_ARRAYLANG['TXT_SUPPORT_FEEDBACK_EMAIL_SEND_FAILED']);
} else {
\Message::error($_ARRAYLANG['TXT_SUPPORT_ERROR_MSG_FIELDS_EMPTY']);
$this->template->setVariable(array('TXT_SUPPORT_ERROR_CLASS_SUBJECT' => !empty($feedBackSubject) ? "" : "errBoxStyle", 'TXT_SUPPORT_ERROR_CLASS_COMMENT' => !empty($feedBackComment) ? "" : "errBoxStyle", 'SUPPORT_FEEDBACK_SUBJECT' => contrexx_raw2xhtml($feedBackSubject), 'SUPPORT_FEEDBACK_COMMENT' => contrexx_raw2xhtml($feedBackComment)));
}
}
//show FeedBack Types
foreach ($feedBackTypes as $key => $feedbackType) {
$this->template->setVariable(array('SUPPORT_FEEDBACK_TYPES' => $feedbackType, 'SUPPORT_FEEDBACK_SELECTED_TYPE' => !empty($feedBackType) && $feedBackType == $key ? 'selected' : '', 'SUPPORT_FEEDBACK_ID' => $key));
$this->template->parse('showFeedBackTypes');
}
$this->template->setVariable(array('SUPPORT_FEEDBACK_FAQ' => $faqLink, 'SUPPORT_FEEDBACK_CUSTOMER_NAME' => $objUser->objUser->getUsername(), 'SUPPORT_FEEDBACK_CUSTOMER_EMAIL' => $objUser->objUser->getEmail()));
$this->template->setVariable(array('TXT_SUPPORT_FEEDBACK' => $_ARRAYLANG['TXT_SUPPORT_FEEDBACK'], 'TXT_SUPPORT_FEEDBACK_SUBJECT' => $_ARRAYLANG['TXT_SUPPORT_FEEDBACK_SUBJECT'], 'TXT_SUPPORT_FEEDBACK_COMMENTS' => $_ARRAYLANG['TXT_SUPPORT_FEEDBACK_COMMENTS']));
}
示例8: preContentLoad
/**
* Do something before content is loaded from DB
*
* @param \Cx\Core\ContentManager\Model\Entity\Page $page The resolved page
*/
public function preContentLoad(\Cx\Core\ContentManager\Model\Entity\Page $page)
{
global $knowledgeInterface, $page_template, $themesPages;
switch ($this->cx->getMode()) {
case \Cx\Core\Core\Controller\Cx::MODE_FRONTEND:
// get knowledge content
\Cx\Core\Setting\Controller\Setting::init('Config', 'component', 'Yaml');
if (MODULE_INDEX < 2 && \Cx\Core\Setting\Controller\Setting::getValue('useKnowledgePlaceholders', 'Config')) {
$knowledgeInterface = new KnowledgeInterface();
if (preg_match('/{KNOWLEDGE_[A-Za-z0-9_]+}/i', \Env::get('cx')->getPage()->getContent())) {
$knowledgeInterface->parse(\Env::get('cx')->getPage()->getContent());
}
if (preg_match('/{KNOWLEDGE_[A-Za-z0-9_]+}/i', $page_template)) {
$knowledgeInterface->parse($page_template);
}
if (preg_match('/{KNOWLEDGE_[A-Za-z0-9_]+}/i', $themesPages['index'])) {
$knowledgeInterface->parse($themesPages['index']);
}
}
break;
}
}
示例9: processRequest
public static function processRequest($token, $arrOrder)
{
global $_CONFIG;
if (empty($token)) {
return array('status' => 'error', 'message' => 'invalid token');
}
$testMode = intval(\Cx\Core\Setting\Controller\Setting::getValue('paymill_use_test_account', 'Shop')) == 0;
$apiKey = $testMode ? \Cx\Core\Setting\Controller\Setting::getValue('paymill_test_private_key', 'Shop') : \Cx\Core\Setting\Controller\Setting::getValue('paymill_live_private_key', 'Shop');
if ($token) {
try {
$request = new Paymill\Request($apiKey);
$transaction = new Paymill\Models\Request\Transaction();
$transaction->setAmount($arrOrder['amount'])->setCurrency($arrOrder['currency'])->setToken($token)->setDescription($arrOrder['note'])->setSource('contrexx_' . $_CONFIG['coreCmsVersion']);
DBG::log("Transactoin created with token:" . $token);
$response = $request->create($transaction);
$paymentId = $response->getId();
DBG::log("Payment ID" . $paymentId);
return array('status' => 'success', 'payment_id' => $paymentId);
} catch (\Paymill\Services\PaymillException $e) {
//Do something with the error informations below
return array('status' => 'error', 'response_code' => $e->getResponseCode(), 'status_code' => $e->getStatusCode(), 'message' => $e->getErrorMessage());
}
}
}
示例10: getDefaultPort
/**
* gets default port from settings
*/
function getDefaultPort()
{
$mode = $this->getMode() == \Cx\Core\Core\Controller\Cx::MODE_BACKEND ? 'Backend' : 'Frontend';
\Cx\Core\Setting\Controller\Setting::init('Config', null, 'Yaml', null, \Cx\Core\Setting\Controller\Setting::NOT_POPULATE);
$protocol = strtoupper($this->getProtocol());
$port = \Cx\Core\Setting\Controller\Setting::getValue('port' . $mode . $protocol, 'Config');
return $port;
}
示例11: view_settings
/**
* Sets up the Payment settings view
* @param \Cx\Core\Html\Sigma $objTemplate The optional Template,
* by reference
* @return boolean True on success,
* false otherwise
*/
static function view_settings(&$objTemplate = null)
{
if (!$objTemplate) {
$objTemplate = new \Cx\Core\Html\Sigma();
$objTemplate->loadTemplateFile('module_shop_settings_payment.html');
} else {
$objTemplate->addBlockfile('SHOP_SETTINGS_FILE', 'settings_block', 'module_shop_settings_payment.html');
}
$i = 0;
foreach (Payment::getArray() as $payment_id => $arrPayment) {
$zone_id = Zones::getZoneIdByPaymentId($payment_id);
$objTemplate->setVariable(array('SHOP_PAYMENT_STYLE' => 'row' . (++$i % 2 + 1), 'SHOP_PAYMENT_ID' => $arrPayment['id'], 'SHOP_PAYMENT_NAME' => $arrPayment['name'], 'SHOP_PAYMENT_HANDLER_MENUOPTIONS' => PaymentProcessing::getMenuoptions($arrPayment['processor_id']), 'SHOP_PAYMENT_COST' => $arrPayment['fee'], 'SHOP_PAYMENT_COST_FREE_SUM' => $arrPayment['free_from'], 'SHOP_ZONE_SELECTION' => Zones::getMenu($zone_id, "zone_id[{$payment_id}]"), 'SHOP_PAYMENT_STATUS' => intval($arrPayment['active']) ? \Html::ATTRIBUTE_CHECKED : ''));
$objTemplate->parse('shopPayment');
}
$objTemplate->setVariable(array('SHOP_PAYMENT_HANDLER_MENUOPTIONS_NEW' => PaymentProcessing::getMenuoptions(-1), 'SHOP_ZONE_SELECTION_NEW' => Zones::getMenu(0, 'zone_id_new')));
// Payment Service Providers
$objTemplate->setVariable(array('SHOP_PAYMILL_STATUS' => \Cx\Core\Setting\Controller\Setting::getValue('paymill_active', 'Shop') ? \Html::ATTRIBUTE_CHECKED : '', 'SHOP_PAYMILL_TEST_SELECTED' => \Cx\Core\Setting\Controller\Setting::getValue('paymill_use_test_account', 'Shop') == 0 ? \Html::ATTRIBUTE_SELECTED : '', 'SHOP_PAYMILL_LIVE_SELECTED' => \Cx\Core\Setting\Controller\Setting::getValue('paymill_use_test_account', 'Shop') == 1 ? \Html::ATTRIBUTE_SELECTED : '', 'SHOP_PAYMILL_TEST_PRIVATE_KEY' => contrexx_raw2xhtml(\Cx\Core\Setting\Controller\Setting::getValue('paymill_test_private_key', 'Shop')), 'SHOP_PAYMILL_TEST_PUBLIC_KEY' => contrexx_raw2xhtml(\Cx\Core\Setting\Controller\Setting::getValue('paymill_test_public_key', 'Shop')), 'SHOP_PAYMILL_LIVE_PRIVATE_KEY' => contrexx_raw2xhtml(\Cx\Core\Setting\Controller\Setting::getValue('paymill_live_private_key', 'Shop')), 'SHOP_PAYMILL_LIVE_PUBLIC_KEY' => contrexx_raw2xhtml(\Cx\Core\Setting\Controller\Setting::getValue('paymill_live_public_key', 'Shop')), 'SHOP_PAYMILL_PRIVATE_KEY' => contrexx_raw2xhtml(\Cx\Core\Setting\Controller\Setting::getValue('paymill_private_key', 'Shop')), 'SHOP_PAYMILL_PUBLIC_KEY' => contrexx_raw2xhtml(\Cx\Core\Setting\Controller\Setting::getValue('paymill_public_key', 'Shop')), 'SHOP_SAFERPAY_ID' => \Cx\Core\Setting\Controller\Setting::getValue('saferpay_id', 'Shop'), 'SHOP_SAFERPAY_STATUS' => \Cx\Core\Setting\Controller\Setting::getValue('saferpay_active', 'Shop') ? \Html::ATTRIBUTE_CHECKED : '', 'SHOP_SAFERPAY_TEST_ID' => \Cx\Core\Setting\Controller\Setting::getValue('saferpay_use_test_account', 'Shop'), 'SHOP_SAFERPAY_TEST_STATUS' => \Cx\Core\Setting\Controller\Setting::getValue('saferpay_use_test_account', 'Shop') ? \Html::ATTRIBUTE_CHECKED : '', 'SHOP_SAFERPAY_FINALIZE_PAYMENT' => \Cx\Core\Setting\Controller\Setting::getValue('saferpay_finalize_payment', 'Shop') ? \Html::ATTRIBUTE_CHECKED : '', 'SHOP_SAFERPAY_WINDOW_MENUOPTIONS' => \Saferpay::getWindowMenuoptions(\Cx\Core\Setting\Controller\Setting::getValue('saferpay_window_option', 'Shop')), 'SHOP_PAYREXX_INSTANCE_NAME' => \Cx\Core\Setting\Controller\Setting::getValue('payrexx_instance_name', 'Shop'), 'SHOP_PAYREXX_API_SECRET' => \Cx\Core\Setting\Controller\Setting::getValue('payrexx_api_secret', 'Shop'), 'SHOP_PAYREXX_STATUS' => \Cx\Core\Setting\Controller\Setting::getValue('payrexx_active', 'Shop') ? \Html::ATTRIBUTE_CHECKED : '', 'SHOP_YELLOWPAY_SHOP_ID' => \Cx\Core\Setting\Controller\Setting::getValue('postfinance_shop_id', 'Shop'), 'SHOP_YELLOWPAY_STATUS' => \Cx\Core\Setting\Controller\Setting::getValue('postfinance_active', 'Shop') ? \Html::ATTRIBUTE_CHECKED : '', 'SHOP_YELLOWPAY_HASH_SIGNATURE_IN' => contrexx_raw2xhtml(\Cx\Core\Setting\Controller\Setting::getValue('postfinance_hash_signature_in', 'Shop')), 'SHOP_YELLOWPAY_HASH_SIGNATURE_OUT' => contrexx_raw2xhtml(\Cx\Core\Setting\Controller\Setting::getValue('postfinance_hash_signature_out', 'Shop')), 'SHOP_YELLOWPAY_AUTHORIZATION_TYPE_OPTIONS' => \Yellowpay::getAuthorizationMenuoptions(\Cx\Core\Setting\Controller\Setting::getValue('postfinance_authorization_type', 'Shop')), 'SHOP_YELLOWPAY_USE_TESTSERVER_CHECKED' => \Cx\Core\Setting\Controller\Setting::getValue('postfinance_use_testserver', 'Shop') ? \Html::ATTRIBUTE_CHECKED : '', 'SHOP_POSTFINANCE_MOBILE_WEBUSER' => contrexx_raw2xhtml(\Cx\Core\Setting\Controller\Setting::getValue('postfinance_mobile_webuser', 'Shop')), 'SHOP_POSTFINANCE_MOBILE_SIGN' => contrexx_raw2xhtml(\Cx\Core\Setting\Controller\Setting::getValue('postfinance_mobile_sign', 'Shop')), 'SHOP_POSTFINANCE_MOBILE_IJUSTWANTTOTEST_CHECKED' => \Cx\Core\Setting\Controller\Setting::getValue('postfinance_mobile_ijustwanttotest', 'Shop') ? \Html::ATTRIBUTE_CHECKED : '', 'SHOP_POSTFINANCE_MOBILE_STATUS' => \Cx\Core\Setting\Controller\Setting::getValue('postfinance_mobile_status', 'Shop') ? \Html::ATTRIBUTE_CHECKED : '', 'SHOP_DATATRANS_AUTHORIZATION_TYPE_OPTIONS' => \Datatrans::getReqtypeMenuoptions(\Cx\Core\Setting\Controller\Setting::getValue('datatrans_request_type', 'Shop')), 'SHOP_DATATRANS_MERCHANT_ID' => \Cx\Core\Setting\Controller\Setting::getValue('datatrans_merchant_id', 'Shop'), 'SHOP_DATATRANS_STATUS' => \Cx\Core\Setting\Controller\Setting::getValue('datatrans_active', 'Shop') ? \Html::ATTRIBUTE_CHECKED : '', 'SHOP_DATATRANS_USE_TESTSERVER_YES_CHECKED' => \Cx\Core\Setting\Controller\Setting::getValue('datatrans_use_testserver', 'Shop') ? \Html::ATTRIBUTE_CHECKED : '', 'SHOP_DATATRANS_USE_TESTSERVER_NO_CHECKED' => \Cx\Core\Setting\Controller\Setting::getValue('datatrans_use_testserver', 'Shop') ? '' : \Html::ATTRIBUTE_CHECKED, 'SHOP_PAYPAL_EMAIL' => contrexx_raw2xhtml(\Cx\Core\Setting\Controller\Setting::getValue('paypal_account_email', 'Shop')), 'SHOP_PAYPAL_STATUS' => \Cx\Core\Setting\Controller\Setting::getValue('paypal_active', 'Shop') ? \Html::ATTRIBUTE_CHECKED : '', 'SHOP_PAYPAL_DEFAULT_CURRENCY_MENUOPTIONS' => \PayPal::getAcceptedCurrencyCodeMenuoptions(\Cx\Core\Setting\Controller\Setting::getValue('paypal_default_currency', 'Shop')), 'SHOP_PAYMENT_LSV_STATUS' => \Cx\Core\Setting\Controller\Setting::getValue('payment_lsv_active', 'Shop') ? \Html::ATTRIBUTE_CHECKED : '', 'SHOP_PAYMENT_DEFAULT_CURRENCY' => Currency::getDefaultCurrencySymbol(), 'SHOP_CURRENCY_CODE' => Currency::getCurrencyCodeById(Currency::getDefaultCurrencyId())));
return true;
}
示例12:
config.protectedSource.push(/<span[^>]*><\/span>/g);
config.protectedSource.push(/<a[^>]*><\/a>/g);
config.tabSpaces = 4;
config.baseHref = '<?php
echo $cx->getRequest()->getUrl()->getProtocol() . '://' . $mainDomain . $cx->getWebsiteOffsetPath();
?>
/';
config.templates_files = [ '<?php
echo $defaultTemplateFilePath;
?>
' ];
config.templates_replaceContent = <?php
echo \Cx\Core\Setting\Controller\Setting::getValue('replaceActualContents', 'Wysiwyg') ? 'true' : 'false';
?>
;
config.toolbar_Full = config.toolbar_Small = [
['Source','-','NewPage','Templates'],
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Scayt'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent', 'Blockquote'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','HorizontalRule','SpecialChar'],
['Format'],
['TextColor','BGColor'],
['ShowBlocks'],
示例13: getGlobalSetting
/**
* Return the global setting
*
* @return string
* @throws DatabaseError
* @global $objDatabase
* @return mixed
*/
protected function getGlobalSetting()
{
//return the global setting('useKnowledgePlaceholders') value
\Cx\Core\Setting\Controller\Setting::init('Config', 'component', 'Yaml');
return \Cx\Core\Setting\Controller\Setting::getValue('useKnowledgePlaceholders', 'Config');
}
示例14: saveSettings
private function saveSettings()
{
global $objDatabase;
/**
* save mailtemplates
*/
foreach ($_POST["filesharingMail"] as $lang => $inputs) {
$objMailTemplate = $objDatabase->Execute("SELECT `subject`, `content` FROM " . DBPREFIX . "module_filesharing_mail_template WHERE `lang_id` = " . intval($lang));
$content = str_replace(array('{', '}'), array('[[', ']]'), contrexx_input2db($inputs["content"]));
if ($objMailTemplate === false or $objMailTemplate->RecordCount() == 0) {
$objDatabase->Execute("INSERT INTO " . DBPREFIX . "module_filesharing_mail_template (`subject`, `content`, `lang_id`) VALUES ('" . contrexx_input2db($inputs["subject"]) . "', '" . contrexx_raw2db($content) . "', '" . contrexx_raw2db($lang) . "')");
} else {
$objDatabase->Execute("UPDATE " . DBPREFIX . "module_filesharing_mail_template SET `subject` = '" . contrexx_input2db($inputs["subject"]) . "', `content` = '" . contrexx_raw2db($content) . "' WHERE `lang_id` = '" . contrexx_raw2db($lang) . "'");
}
}
/**
* save permissions
*/
\Cx\Core\Setting\Controller\Setting::init('FileSharing', 'config');
$oldFilesharingSetting = \Cx\Core\Setting\Controller\Setting::getValue('permission', 'FileSharing');
$newFilesharingSetting = $_POST['filesharingSettingsPermission'];
if (!is_numeric($newFilesharingSetting)) {
if (is_numeric($oldFilesharingSetting)) {
// remove AccessId
\Permission::removeAccess($oldFilesharingSetting, 'dynamic');
}
} else {
$accessGroups = '';
if (isset($_POST['filesharing_access_associated_groups'])) {
$accessGroups = $_POST['filesharing_access_associated_groups'];
}
// get groups
\Permission::removeAccess($oldFilesharingSetting, 'dynamic');
if (isset($_POST['filesharing_access_associated_groups'])) {
$accessGroups = $_POST['filesharing_access_associated_groups'];
}
// add AccessID
$newFilesharingSetting = \Permission::createNewDynamicAccessId();
// save AccessID
if (count($accessGroups)) {
\Permission::setAccess($newFilesharingSetting, 'dynamic', $accessGroups);
}
}
// save new setting
\Cx\Core\Setting\Controller\Setting::set('permission', $newFilesharingSetting);
\Cx\Core\Setting\Controller\Setting::updateAll();
}
示例15: getForm
/**
* parse the upload form
*
* @access private
*/
private function getForm()
{
global $_ARRAYLANG;
\Cx\Core\Setting\Controller\Setting::init('FileSharing', 'config');
$permissionNeeded = \Cx\Core\Setting\Controller\Setting::getValue('permission', 'FileSharing');
if (!$permissionNeeded) {
\Cx\Core\Setting\Controller\Setting::add('permission', 'off');
$permissionNeeded = \Cx\Core\Setting\Controller\Setting::getValue('permission', 'FileSharing');
}
if ($permissionNeeded == 'off' || is_numeric($permissionNeeded) && !\Permission::checkAccess($permissionNeeded, 'dynamic')) {
$this->objTemplate->setVariable('FILESHARING_NO_ACCESS', $_ARRAYLANG['TXT_FILESHARING_NO_ACCESS']);
if ($this->objTemplate->parse('no_access')) {
$this->objTemplate->parse('no_access');
}
if ($this->objTemplate->blockExists('upload_form')) {
$this->objTemplate->hideBlock('upload_form');
}
if ($this->objTemplate->blockExists('uploaded')) {
$this->objTemplate->hideBlock('uploaded');
}
} else {
// parse the upload form
// init uploader
$uploadId = $this->initUploader();
// set form parameters
$formAction = clone \Env::get("Resolver")->getUrl();
$formAction->setParam("uploadId", $uploadId);
$formAction->setParam("check", false);
$formAction->setParam("hash", false);
$this->objTemplate->setVariable(array("FORM_ACTION" => $formAction, "FORM_METHOD" => "POST", "FILESHARING_EMAIL" => $_ARRAYLANG["TXT_EMAIL"], "FILESHARING_EMAIL_INFO" => $_ARRAYLANG["TXT_FILESHARING_EMAIL_INFO"], "FILESHARING_SUBJECT" => $_ARRAYLANG["TXT_FILESHARING_SUBJECT"], "FILESHARING_SUBJECT_INFO" => $_ARRAYLANG["TXT_FILESHARING_SUBJECT_INFO"], "FILESHARING_MESSAGE" => $_ARRAYLANG["TXT_FILESHARING_MESSAGE"], "FILESHARING_MESSAGE_INFO" => $_ARRAYLANG["TXT_FILESHARING_MESSAGE_INFO"], "FILESHARING_EXPIRATION" => $_ARRAYLANG["TXT_FILESHARING_EXPIRATION"], "FILESHARING_SEND" => $_ARRAYLANG["TXT_FILESHARING_SEND"], "FILESHARING_MORE" => $_ARRAYLANG["TXT_FILESHARING_MORE"], "FILESHARING_ERROR_FILE_NOT_FOUND" => $_ARRAYLANG["TXT_FILESHARING_ERROR_FILE_NOT_FOUND"], "FILESHARING_ERROR_NO_FILES_UPLOADED" => $_ARRAYLANG["TXT_FILESHARING_ERROR_NO_FILES_UPLOADED"], 'TXT_FILESHARING_EXPLANATION' => $_ARRAYLANG['TXT_FILESHARING_EXPLANATION'], 'TXT_FILESHARING_I_AGREE' => $_ARRAYLANG['TXT_FILESHARING_I_AGREE'], 'TXT_FILESHARING_TERMS_OF_SERVICE' => $_ARRAYLANG['TXT_FILESHARING_TERMS_OF_SERVICE'], 'TXT_FILESHARING_I_ACCEPT' => $_ARRAYLANG['TXT_FILESHARING_I_ACCEPT'], 'TXT_FILESHARING_FILES' => $_ARRAYLANG['TXT_FILESHARING_FILES']));
if ($this->objTemplate->blockExists('upload_form')) {
$this->objTemplate->touchBlock("upload_form");
}
if ($this->objTemplate->blockExists('uploaded')) {
$this->objTemplate->hideBlock("uploaded");
}
}
}