本文整理汇总了PHP中CRatings::GetRatingConfigs方法的典型用法代码示例。如果您正苦于以下问题:PHP CRatings::GetRatingConfigs方法的具体用法?PHP CRatings::GetRatingConfigs怎么用?PHP CRatings::GetRatingConfigs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRatings
的用法示例。
在下文中一共展示了CRatings::GetRatingConfigs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __AddComponents
public static function __AddComponents($ID, $arFields)
{
global $DB;
$arRatingConfigs = CRatings::GetRatingConfigs($arFields["ENTITY_ID"], false);
$ID = intval($ID);
$err_mess = CRatings::err_mess() . "<br>Function: __AddComponents<br>Line: ";
foreach ($arFields['CONFIGS'] as $MODULE_ID => $RAT_ARRAY) {
if (!is_array($RAT_ARRAY)) {
continue;
}
foreach ($RAT_ARRAY as $RAT_TYPE => $COMPONENT) {
if (!is_array($COMPONENT)) {
continue;
}
foreach ($COMPONENT as $COMPONENT_NAME => $COMPONENT_VALUE) {
if (!isset($arRatingConfigs[$MODULE_ID][$MODULE_ID . "_" . $RAT_TYPE . "_" . $COMPONENT_NAME])) {
continue;
}
$arFields_i = array("RATING_ID" => $ID, "ACTIVE" => isset($COMPONENT_VALUE["ACTIVE"]) && $COMPONENT_VALUE["ACTIVE"] == 'Y' ? 'Y' : 'N', "ENTITY_ID" => $arFields["ENTITY_ID"], "MODULE_ID" => $MODULE_ID, "RATING_TYPE" => $RAT_TYPE, "NAME" => $COMPONENT_NAME, "COMPLEX_NAME" => $arFields["ENTITY_ID"] . '_' . $MODULE_ID . '_' . $RAT_TYPE . '_' . $COMPONENT_NAME, "CLASS" => $arRatingConfigs[$MODULE_ID][$MODULE_ID . "_" . $RAT_TYPE . "_" . $COMPONENT_NAME]["CLASS"], "CALC_METHOD" => $arRatingConfigs[$MODULE_ID][$MODULE_ID . "_" . $RAT_TYPE . "_" . $COMPONENT_NAME]["CALC_METHOD"], "EXCEPTION_METHOD" => $arRatingConfigs[$MODULE_ID][$MODULE_ID . "_" . $RAT_TYPE . "_" . $COMPONENT_NAME]["EXCEPTION_METHOD"], "REFRESH_INTERVAL" => $arRatingConfigs[$MODULE_ID][$MODULE_ID . "_" . $RAT_TYPE . "_" . $COMPONENT_NAME]["REFRESH_TIME"], "~LAST_MODIFIED" => $DB->GetNowFunction(), "~NEXT_CALCULATION" => $DB->GetNowFunction(), "IS_CALCULATED" => "N", "~CONFIG" => "'" . serialize($COMPONENT_VALUE) . "'");
$DB->Add("b_rating_component", $arFields_i, array(), "", false, $err_mess . __LINE__);
}
}
}
return true;
}
示例2: GetMessage
$tabControl->BeginCustomField("ACTIVE", GetMessage('RATING_EDIT_FRM_ACTIVE'), false);
?>
<tr>
<td><?php
echo GetMessage("RATING_EDIT_FRM_ACTIVE");
?>
</td>
<td><?php
echo InputType("checkbox", "ACTIVE", "Y", $str_ACTIVE);
?>
</td>
</tr>
<?php
$tabControl->EndCustomField("ACTIVE");
$tabControl->AddSection("CAT_RATING_COMPONENT", GetMessage("RATING_EDIT_CAT_RATING_COMPONENT"));
$arRatingConfigs = CRatings::GetRatingConfigs($str_ENTITY_ID);
$tabControl->BeginCustomField("CAT_WHAT_CNT_FORM", '', true);
?>
<tr>
<td width="100%" colspan="2">
<?php
$aTabs2 = array();
foreach ($arRatingConfigs as $arConfigModule => $arConfigModuleValue) {
$aTabs2[] = array("DIV" => "panel_" . $arConfigModule, "TAB" => $arConfigModuleValue['MODULE_NAME'], "TITLE" => $arConfigModuleValue['MODULE_NAME']);
}
$tabControl2 = new CAdminViewTabControl("tabControl2", $aTabs2);
$tabControl2->Begin();
foreach ($arRatingConfigs as $arConfigModule => $arConfigModuleValue) {
$tabControl2->BeginNextTab();
foreach ($arConfigModuleValue as $arConfigType => $arConfigTypeValue) {
if (is_array($arConfigTypeValue)) {