当前位置: 首页>>代码示例>>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;未经允许,请勿转载。