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


PHP CBitrixComponent::onPrepareComponentParams方法代碼示例

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


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

示例1: onPrepareComponentParams

 public function onPrepareComponentParams($params)
 {
     $params = parent::onPrepareComponentParams($params);
     if (!isset($this->arParams["WIDTH"])) {
         $this->arParams["WIDTH"] = 400;
     }
     if (!isset($this->arParams["HEIGHT"])) {
         $this->arParams["HEIGHT"] = 400;
     }
     if (!isset($this->arParams["SELECTED_STORE"])) {
         $this->arParams["SELECTED_STORE"] = 0;
         if (isset($params["STORES_LIST"]) && is_array($params["STORES_LIST"])) {
             reset($params["STORES_LIST"]);
             $this->arParams["SELECTED_STORE"] = key($params["STORES_LIST"]);
         }
     }
     return $params;
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:18,代碼來源:class.php

示例2: onPrepareComponentParams

 /**
  * @param $arParams
  * @return array
  */
 public function onPrepareComponentParams($arParams)
 {
     $arParams['FILTER_NAME'] = $this->initFilterName($arParams['FILTER_NAME']);
     $this->loadTooltipFromSocialNetwork($arParams);
     $arParams["NAME_TEMPLATE"] = empty($arParams["NAME_TEMPLATE"]) || !trim($arParams["NAME_TEMPLATE"]) ? CSite::GetNameFormat() : $arParams["NAME_TEMPLATE"];
     //set default to Y
     $arParams['SHOW_LOGIN'] = empty($arParams['SHOW_LOGIN']) || $arParams['SHOW_LOGIN'] != "N" ? "Y" : "N";
     //if not set value, set to default
     $arParams["PM_URL"] = empty($arParams["PM_URL"]) ? "/company/personal/messages/chat/#USER_ID#/" : $arParams["PM_URL"];
     $arParams["PATH_TO_CONPANY_DEPARTMENT"] = empty($arParams["PATH_TO_CONPANY_DEPARTMENT"]) ? "/company/structure.php?set_filter_structure=Y&structure_UF_DEPARTMENT=#ID#" : $arParams["PATH_TO_CONPANY_DEPARTMENT"];
     $arParams["PATH_TO_VIDEO_CALL"] = IsModuleInstalled("video") && empty($arParams["PATH_TO_VIDEO_CALL"]) ? "/company/personal/video/#USER_ID#/" : $arParams["PATH_TO_VIDEO_CALL"];
     TrimArr($arParams['ALPHABET_LANG']);
     $arParams['ALPHABET_LANG'] = empty($arParams['ALPHABET_LANG']) ? array(LANGUAGE_ID) : $arParams['ALPHABET_LANG'];
     $arParams['CURRENT_VIEW'] = $this->getCurrentView($arParams);
     $arParams['LIST_URL'] = $this->getApplication()->GetCurPage();
     if (!$arParams['DETAIL_URL']) {
         $arParams['DETAIL_URL'] = $arParams['LIST_URL'] . '?ID=#USER_ID#';
     }
     return parent::onPrepareComponentParams($arParams);
 }
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:24,代碼來源:class.php

示例3: onPrepareComponentParams

 public function onPrepareComponentParams($arParams)
 {
     $arParams['action'] = strtolower($arParams['action']);
     $arParams['inviteFromUserId'] = (int) $arParams['inviteFromUserId'];
     $arParams['attachToUserId'] = (int) $arParams['attachToUserId'];
     $arParams['attachToUserIds'] = empty($arParams['attachToUserIds']) ? array() : $arParams['attachToUserIds'];
     $arParams['unshareUserIds'] = empty($arParams['unshareUserIds']) ? array() : $arParams['unshareUserIds'];
     $arParams['inviteDescription'] = empty($arParams['inviteDescription']) ? '' : $arParams['inviteDescription'];
     $arParams['canEdit'] = !empty($arParams['canEdit']);
     $arParams['pathToUser'] = !empty($arParams['pathToUser']) ? $arParams['pathToUser'] : '/company/personal/user/#user_id#/';
     $arParams['pathToGroup'] = !empty($arParams['pathToGroup']) ? $arParams['pathToGroup'] : '/workgroups/group/#group_id#/';
     $arParams['userListType'] = !empty($arParams['userListType']) ? strtolower($arParams['userListType']) : 'cannot_edit';
     $arParams['currentUserCanUnshare'] = !empty($arParams['currentUserCanUnshare']);
     if (!is_array($arParams['attachToUserIds'])) {
         $arParams['attachToUserIds'] = array();
     }
     if (!is_array($arParams['unshareUserIds'])) {
         $arParams['unshareUserIds'] = array();
     }
     return parent::onPrepareComponentParams($arParams);
 }
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:21,代碼來源:class.php

示例4: onPrepareComponentParams

 public function onPrepareComponentParams($arParams)
 {
     $arParams = parent::onPrepareComponentParams($arParams);
     $arParams = array_merge(static::getInternalComponentParameters(), $arParams);
     if (!isset($arParams['GREEDY_PARTS'])) {
         $arParams['GREEDY_PARTS'] = array();
     } elseif (is_string($arParams['GREEDY_PARTS'])) {
         $arParams['GREEDY_PARTS'] = trim(explode(',', $arParams['GREEDY_PARTS']));
     }
     return $arParams;
 }
開發者ID:digitalwand,項目名稱:mvc.base,代碼行數:11,代碼來源:class.php

示例5: onPrepareComponentParams

 public function onPrepareComponentParams($arParams)
 {
     $arParams['createType'] = !empty($arParams['createType']) ? strtolower($arParams['createType']) : null;
     $arParams['newFileName'] = !empty($arParams['newFileName']) ? $arParams['newFileName'] : '';
     $arParams['commitDoc'] = !empty($arParams['commitDoc']);
     return parent::onPrepareComponentParams($arParams);
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:7,代碼來源:editdoccomponentbase.php


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