當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CUserOptions::getOption方法代碼示例

本文整理匯總了PHP中CUserOptions::getOption方法的典型用法代碼示例。如果您正苦於以下問題:PHP CUserOptions::getOption方法的具體用法?PHP CUserOptions::getOption怎麽用?PHP CUserOptions::getOption使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CUserOptions的用法示例。


在下文中一共展示了CUserOptions::getOption方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getDocumentServiceCode

 public static function getDocumentServiceCode()
 {
     static $service = null;
     if ($service !== null) {
         return $service;
     }
     /** @noinspection PhpParamsInspection */
     $userSettings = \CUserOptions::getOption(Driver::INTERNAL_MODULE_ID, 'doc_service', array('default' => ''));
     if (empty($userSettings['default'])) {
         $userSettings['default'] = '';
     }
     $service = $userSettings['default'];
     return $userSettings['default'];
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:14,代碼來源:configuration.php

示例2: onUserLoginSocserv

 public static function onUserLoginSocserv($params)
 {
     global $USER;
     if ($params['EXTERNAL_AUTH_ID'] === \CSocServBitrix24Net::ID && \Bitrix\Main\ModuleManager::isModuleInstalled('bitrix24')) {
         $notificationOptions = \CUserOptions::getOption("socialservices", "notifications", array());
         $lastDate = 0;
         if (isset($notificationOptions["CONTACTS_NOTIFY_DATE"])) {
             $lastDate = $notificationOptions["CONTACTS_NOTIFY_DATE"];
         }
         if ($lastDate < time() - 86400) {
             static::notifyPossible($USER->getId());
             $notificationOptions["CONTACTS_NOTIFY_DATE"] = time();
             \CUserOptions::setOption("socialservices", "notifications", $notificationOptions);
         }
     }
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:16,代碼來源:contact.php

示例3: onPrepareComponentParams

 public function onPrepareComponentParams($params)
 {
     $params['IBLOCK_ID'] = isset($params['IBLOCK_ID']) ? (int) $params['IBLOCK_ID'] : 0;
     if (!empty($_REQUEST['IBLOCK_ID'])) {
         $params['IBLOCK_ID'] = (int) $_REQUEST['IBLOCK_ID'];
     }
     $params['SECTION_ID'] = isset($_REQUEST['SECTION_ID']) ? (int) $_REQUEST['SECTION_ID'] : 0;
     if (!empty($_REQUEST['action']) && $_REQUEST['action'] == 'change_iblock') {
         $params['SECTION_ID'] = 0;
         unset($_REQUEST['mode']);
     }
     $params['LID'] = isset($_REQUEST["LID"]) ? htmlspecialcharsbx($_REQUEST["LID"]) : '';
     if ($params['LID'] == '') {
         $params['LID'] = false;
     }
     $params['func_name'] = isset($_REQUEST["func_name"]) ? preg_replace("/[^a-zA-Z0-9_\\.]/is", "", $_REQUEST["func_name"]) : '';
     $params['event'] = isset($_REQUEST['event']) ? preg_replace("/[^a-zA-Z0-9_\\.]/is", "", $_REQUEST['event']) : '';
     $params['caller'] = isset($_REQUEST["caller"]) ? preg_replace("/[^a-zA-Z0-9_\\-]/is", "", $_REQUEST["caller"]) : '';
     $params['subscribe'] = isset($_REQUEST['subscribe']) && $_REQUEST['subscribe'] == 'Y';
     $params['store_from_id'] = isset($_REQUEST["STORE_FROM_ID"]) ? (int) $_REQUEST["STORE_FROM_ID"] : 0;
     if ($params['store_from_id'] < 0) {
         $params['store_from_id'] = 0;
     }
     if (!empty($_REQUEST['del_filter'])) {
         ClearVars('filter_');
         foreach ($_REQUEST as $key => $value) {
             if (strpos($key, 'filter_') === 0) {
                 unset($_REQUEST[$key]);
             }
         }
     }
     if (isset($_REQUEST['QUERY'])) {
         $_REQUEST['QUERY'] = \CUtil::ConvertToLangCharset($_REQUEST['QUERY']);
     }
     $this->simpleSearch = \Bitrix\Main\Config\Option::get('catalog', 'product_form_simple_search', 'Y') == 'Y';
     if (isset($params['CHECK_PERMISSIONS']) && $params['CHECK_PERMISSIONS'] == 'N') {
         $this->checkPermissions = false;
     }
     $userOptions = \CUserOptions::getOption("catalog", self::TABLE_ID_PREFIX . '_' . $params['caller'], false, $this->getUserId());
     if (is_array($userOptions)) {
         if (!$params['IBLOCK_ID']) {
             $params['IBLOCK_ID'] = (int) $userOptions['IBLOCK_ID'];
         }
         if (!$params['SECTION_ID'] && !isset($_REQUEST['SECTION_ID']) && $params['IBLOCK_ID'] === (int) $userOptions['IBLOCK_ID']) {
             $params['SECTION_ID'] = (int) $userOptions['SECTION_ID'];
         }
         if (!isset($_REQUEST['QUERY']) && (!isset($_REQUEST['mode']) || $_REQUEST['mode'] != 'list') && isset($userOptions['QUERY'])) {
             $_REQUEST['QUERY'] = $userOptions['QUERY'];
         }
     }
     return $params;
 }
開發者ID:ASDAFF,項目名稱:1C_Bitrix_info_site,代碼行數:52,代碼來源:class.php

示例4: preg_replace

if (strlen($lid) <= 0) {
    $lid = false;
}
$func_name = preg_replace("/[^a-zA-Z0-9_\\-\\.]/is", "", $_REQUEST["func_name"]);
$caller = htmlspecialcharsbx($_REQUEST['caller']);
$buyerId = intval($USER->GetID());
$sTableID = "tbl_product_search";
if ($caller) {
    if (!isset($_REQUEST["set_filter"])) {
        $addURLParam = "&set_filter=Y";
        if (!isset($_REQUEST["IBLOCK_ID"])) {
            $addURLParam .= CUserOptions::getOption("catalog", "product_search_" . $caller, "", $buyerId);
            LocalRedirect($GLOBALS['APPLICATION']->GetCurPageParam() . $addURLParam);
        }
    }
    $addURLParam = CUserOptions::getOption("catalog", "product_search_storeDocs", "", $userId);
    $sTableID .= '_' . $caller;
}
$oSort = new CAdminSorting($sTableID, "ID", "asc");
$lAdmin = new CAdminList($sTableID, $oSort);
$dbIBlock = CIBlock::GetByID($iblockId);
if (!($arIBlock = $dbIBlock->Fetch())) {
    $arFilterTmp = array("MIN_PERMISSION" => "R");
    if (strlen($lid) > 0) {
        $arFilterTmp["LID"] = $lid;
    }
    $arCatalogFilter = array();
    if ($boolSubscribe) {
        $arCatalogFilter['SUBSCRIPTION'] = 'Y';
    }
    $dbItem = CCatalog::GetList(array(), $arCatalogFilter, false, false, array('IBLOCK_ID', 'PRODUCT_IBLOCK_ID', 'SKU_PROPERTY_ID'));
開發者ID:akniyev,項目名稱:itprom_dobrohost,代碼行數:31,代碼來源:cat_store_product_search.php

示例5: isset

global $USER;
CJSCore::Init(array("fx", "date"));
$diskSpace = isset($arResult["diskSpace"]) && strlen($arResult["diskSpace"]) > 0 ? doubleval($arResult["diskSpace"]) : 0;
$diskSpace = $diskSpace < 0 ? 0 : $diskSpace;
$freeSpace = isset($arResult["quota"]) && strlen($arResult["quota"]) > 0 ? doubleval($arResult["quota"]) : 0;
$freeSpace = $freeSpace < 0 ? 0 : $freeSpace;
$personalLibIndex = $arResult['personalLibIndex'];
$isInstalledPull = $arResult["isInstalledPull"];
$currenUserId = $USER->getId();
$isMac = false;
$request = Bitrix\Main\Context::getCurrent()->getRequest();
if (stripos($request->getUserAgent(), "Macintosh") !== false) {
    $isMac = true;
}
$diskEnabled = \Bitrix\Main\Config\Option::get('disk', 'successfully_converted', false) && CModule::includeModule('disk');
$isFirstRunAfterConvert = $diskEnabled && !\CUserOptions::getOption('disk', 'DesktopDiskInstall') && !\CUserOptions::getOption('disk', 'DesktopDiskReInstall') && \CUserOptions::getOption('webdav', 'DesktopDiskInstall');
IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/file.php");
?>
<script type="text/javascript">
	BX.message({
		'disk_name': "<?php 
echo GetMessageJS('WD_DISK_NAME');
?>
",
		'disk_default': "<?php 
echo GetMessageJS('WD_DISK_JS_ERROR_DEFAULT');
?>
",
		'disk_already_attached': "<?php 
echo GetMessageJS('WD_DISK_JS_ERROR_ALREADY_ATTACHED');
?>
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:31,代碼來源:template.php

示例6: sortPropsTable

			}
			function sortPropsTable(table, compareFunction)
			{
				for (var j = 1; j <= table.rows.length - 1; j++)
				{
					for (var i = 1; i <= table.rows.length - j; i++)
					{
						if (compareFunction(table.rows[i-1], table.rows[i]) > 0)
						{
							table.tBodies[0].insertBefore(table.rows[i], table.rows[i-1]);
						}
					}
				}
			}
			<?php 
    $userSettings = CUserOptions::getOption('iblock', 'section_property');
    if ($userSettings["mode"] === "tree") {
        ?>
			BX.ready(function(){
				setMode(BX('table_SECTION_PROPERTY'), 'tree');
			});
			<?php 
    }
    ?>
			</script>
		</td></tr>

		<?php 
    $arCatalog = false;
    if (CModule::IncludeModule("catalog")) {
        $arCatalog = CCatalog::GetSkuInfoByProductID($IBLOCK_ID);
開發者ID:spas-viktor,項目名稱:books,代碼行數:31,代碼來源:iblock_section_edit.php

示例7: getTabSettings

	function getTabSettings($tabIdx)
	{
		if (isset($this->tabs[$tabIdx]["SETTINGS"]))
			return $this->tabs[$tabIdx]["SETTINGS"];

		$tabSettings = CUserOptions::getOption($this->moduleId, $this->getCurrentTabOptionName($tabIdx));

		$tabSettings["order"] = isset($tabSettings["order"]) ? $tabSettings["order"] : array();
		if (!empty($tabSettings["order"]))
			$tabSettings["order"] = explode(",", $tabSettings["order"]);

		$tabSettings["hidden"] = isset($tabSettings["hidden"]) ? $tabSettings["hidden"] : array();
		if (!empty($tabSettings["hidden"]))
			$tabSettings["hidden"] = explode(",", $tabSettings["hidden"]);

		$this->tabs[$tabIdx]["SETTINGS"] = $tabSettings;
		return $tabSettings;
	}
開發者ID:nycmic,項目名稱:bittest,代碼行數:18,代碼來源:admin_lib.php

示例8: getViewMode

 private function getViewMode()
 {
     static $viewMode = null;
     if ($viewMode !== null) {
         return $viewMode;
     }
     $userSettings = \CUserOptions::getOption(Driver::INTERNAL_MODULE_ID, 'grid', array('viewMode' => 'grid'));
     $viewMode = $userSettings['viewMode'];
     return $viewMode;
 }
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:10,代碼來源:class.php

示例9: getGridSpecificOptions

 private function getGridSpecificOptions()
 {
     return \CUserOptions::getOption(Driver::INTERNAL_MODULE_ID, 'grid', array('sortMode' => self::SORT_MODE_ORDINARY, 'viewMode' => self::VIEW_MODE_GRID));
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:4,代碼來源:folderlistoptions.php

示例10: isFirstRun

 private function isFirstRun($userId)
 {
     $userSettings = \CUserOptions::getOption(Driver::INTERNAL_MODULE_ID, 'recently_used', array('r' => ''), $userId);
     return empty($userSettings['r']);
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:5,代碼來源:recentlyusedmanager.php

示例11: isActive

 /**
  * Checks banner for current user by name.
  * @param string $name Banner name.
  * @return bool
  */
 public static function isActive($name)
 {
     $userSettings = \CUserOptions::getOption(Driver::INTERNAL_MODULE_ID, '~banner-offer', array($name => false));
     return empty($userSettings[$name]);
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:10,代碼來源:banner.php

示例12: isDesktopDiskInstall

 /**
  * Checks status of disk install.
  * @return bool
  */
 public static function isDesktopDiskInstall()
 {
     return (bool) \CUserOptions::getOption(Driver::INTERNAL_MODULE_ID, self::OPT_DESKTOP_DISK_INSTALL);
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:8,代碼來源:desktop.php

示例13: processActionDefault

 protected function processActionDefault()
 {
     $this->arResult['ACTIVITY_GROUPS'] = array('document' => Loc::getMessage('BIZPROC_WFEDIT_CATEGORY_DOC'), 'logic' => Loc::getMessage('BIZPROC_WFEDIT_CATEGORY_CONSTR'), 'interaction' => Loc::getMessage('BIZPROC_WFEDIT_CATEGORY_INTER'), 'other' => Loc::getMessage('BIZPROC_WFEDIT_CATEGORY_OTHER'));
     $runtime = CBPRuntime::getRuntime();
     $this->arResult['ACTIVITIES'] = $runtime->searchActivitiesByType('activity');
     if ($this->arResult['ID'] > 0) {
         $this->getApplication()->setTitle(Loc::getMessage('BIZPROC_WFEDIT_TITLE_EDIT'));
     } else {
         $this->getApplication()->setTitle(Loc::getMessage('BIZPROC_WFEDIT_TITLE_ADD'));
     }
     $defUserParamsStr = serialize(array('groups' => array()));
     $userParamsStr = CUserOptions::getOption('~bizprocdesigner', 'activity_settings', $defUserParamsStr);
     if (empty($userParamsStr) || !CheckSerializedData($userParamsStr)) {
         $userParamsStr = $defUserParamsStr;
     }
     $this->arResult['USER_PARAMS'] = unserialize($userParamsStr);
     $this->includeComponentTemplate();
 }
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:18,代碼來源:class.php


注:本文中的CUserOptions::getOption方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。