1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
discountmodule.php
См. документацию.
1<?php
2namespace Bitrix\Catalog;
3
4use Bitrix\Main,
5 Bitrix\Main\Localization\Loc;
6Loc::loadMessages(__FILE__);
7
33
34class DiscountModuleTable extends Main\Entity\DataManager
35{
41 public static function getTableName()
42 {
43 return 'b_catalog_discount_module';
44 }
45
51 public static function getMap()
52 {
53 return array(
54 'ID' => new Main\Entity\IntegerField('ID', array(
55 'primary' => true,
56 'autocomplete' => true,
57 'title' => Loc::getMessage('DISCOUNT_MODULE_ENTITY_ID_FIELD')
58 )),
59 'DISCOUNT_ID' => new Main\Entity\IntegerField('DISCOUNT_ID', array(
60 'required' => true,
61 'title' => Loc::getMessage('DISCOUNT_MODULE_ENTITY_DISCOUNT_ID_FIELD')
62 )),
63 'MODULE_ID' => new Main\Entity\StringField('MODULE_ID', array(
64 'required' => true,
65 'validation' => array(__CLASS__, 'validateModuleId'),
66 'title' => Loc::getMessage('DISCOUNT_MODULE_ENTITY_MODULE_ID_FIELD')
67 ))
68 );
69 }
70
75 public static function validateModuleId()
76 {
77 return array(
78 new Main\Entity\Validator\Length(null, 50),
79 );
80 }
81
88 public static function deleteByDiscount($discount)
89 {
90 $discount = (int)$discount;
91 if ($discount <= 0)
92 return;
94 $helper = $conn->getSqlHelper();
95 $conn->queryExecute(
96 'delete from '.$helper->quote(self::getTableName()).' where '.$helper->quote('DISCOUNT_ID').' = '.$discount
97 );
98 unset($helper, $conn);
99 }
100}
static deleteByDiscount($discount)
Определения discountmodule.php:88
static validateModuleId()
Определения discountmodule.php:75
static getConnection($name="")
Определения application.php:638
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
Определения ufield.php:9
$discount
Определения waybill.php:788