本文整理匯總了PHP中CAdminNotify::Error方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAdminNotify::Error方法的具體用法?PHP CAdminNotify::Error怎麽用?PHP CAdminNotify::Error使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CAdminNotify
的用法示例。
在下文中一共展示了CAdminNotify::Error方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
foreach ($propertyValues as $propertyValue) {
$variantIdId = $list[$propertyValue['value']];
$valuesToElements[$propertyValue['id_element']][] = $variantIdId;
}
foreach ($valuesToElements as $elementId => $elementValues) {
$iblockElement->SetPropertyValuesEx($elementId, $idIBlock, array($idProperty => $elementValues));
}
return true;
};
if ($_POST['apply'] == 'Применить') {
$iblockID = intval($_POST['selectIblocks']);
$propertyID = intval($_POST['selectProperties']);
$newTypeIBlock = $_POST['new-type-property-info-block'];
$conversionResult = $conversionProperty($propertyID, $iblockID, $newTypeIBlock);
$conversionResult && CAdminNotify::Add(array('MESSAGE' => 'Конвертация прошла успешно', 'TAG' => 'save_property_notify', 'MODULE_ID' => 'ws.tools', 'ENABLE_CLOSE' => 'Y'));
!$conversionResult && CAdminNotify::Error(array('MESSAGE' => 'Конвертация не прошла успешно', 'TAG' => 'save_property_notify_error', 'MODULE_ID' => 'ws.tools', 'ENABLE_CLOSE' => 'Y'));
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$jsParams = array();
$types = array();
$rsTypes = \Bitrix\Iblock\TypeLanguageTable::getList(array('filter' => array('LANGUAGE_ID' => LANG)));
while ($type = $rsTypes->fetch()) {
$types[$type['IBLOCK_TYPE_ID']] = $type['NAME'];
}
$jsParams['types'] = array('name' => 'selectTypes', 'list' => $types);
$iblocks = array();
$rsIblocks = \Bitrix\Iblock\IblockTable::getList();
while ($iblock = $rsIblocks->fetch()) {
$iblocks[$iblock['ID']] = array('name' => $iblock['NAME'], 'type' => $iblock['IBLOCK_TYPE_ID']);
}
$jsParams['iblocks'] = array('name' => 'selectIblocks', 'list' => $iblocks);