本文整理汇总了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;
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}