本文整理汇总了PHP中CRatings::GetRatingObjects方法的典型用法代码示例。如果您正苦于以下问题:PHP CRatings::GetRatingObjects方法的具体用法?PHP CRatings::GetRatingObjects怎么用?PHP CRatings::GetRatingObjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRatings
的用法示例。
在下文中一共展示了CRatings::GetRatingObjects方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __CheckFields
public static function __CheckFields($arFields)
{
$aMsg = array();
if (is_set($arFields, "NAME") && trim($arFields["NAME"]) == "") {
$aMsg[] = array("id" => "NAME", "text" => GetMessage("RATING_GENERAL_ERR_NAME"));
}
if (is_set($arFields, "ACTIVE") && !($arFields["ACTIVE"] == 'Y' || $arFields["ACTIVE"] == 'N')) {
$aMsg[] = array("id" => "ACTIVE", "text" => GetMessage("RATING_GENERAL_ERR_ACTIVE"));
}
if (is_set($arFields, "ENTITY_ID")) {
$arObjects = CRatings::GetRatingObjects();
if (!in_array($arFields['ENTITY_ID'], $arObjects)) {
$aMsg[] = array("id" => "ENTITY_ID", "text" => GetMessage("RATING_GENERAL_ERR_ENTITY_ID"));
}
}
if (is_set($arFields, "CALCULATION_METHOD") && trim($arFields["CALCULATION_METHOD"]) == "") {
$aMsg[] = array("id" => "CALCULATION_METHOD", "text" => GetMessage("RATING_GENERAL_ERR_CAL_METHOD"));
}
if (!empty($aMsg)) {
$e = new CAdminException($aMsg);
$GLOBALS["APPLICATION"]->ThrowException($e);
return false;
}
return true;
}
示例2: htmlspecialcharsbx
<input type="hidden" name="action" value="" id="action">
<?php
if ($_REQUEST["addurl"] != "") {
?>
<input type="hidden" name="addurl" value="<?php
echo htmlspecialcharsbx($_REQUEST["addurl"]);
?>
">
<?php
}
$tabControl->EndEpilogContent();
$tabControl->Begin();
$tabControl->BeginNextFormTab();
$tabControl->AddEditField("NAME", GetMessage('RATING_EDIT_FRM_NAME'), true, array("size" => 54, "maxlength" => 255), $str_NAME);
$tabControl->BeginCustomField("ENTITY_ID", GetMessage('RATING_EDIT_FRM_TYPE_ID'), true);
$arObjects = CRatings::GetRatingObjects();
?>
<tr style="<?php
echo count($arObjects) > 1 ? '' : 'display:none';
?>
" class="adm-detail-required-field">
<td><?php
echo GetMessage("RATING_EDIT_FRM_TYPE_ID");
?>
</td>
<td><?php
echo SelectBoxFromArray("ENTITY_ID", array('reference_id' => $arObjects, 'reference' => $arObjects), $str_ENTITY_ID, "", "onChange=\"jsTypeChanged('rating_form')\"");
?>
</td>
</tr>
<?php