1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
FreeAppTable.php
См. документацию.
1<?php
2
4
12
30{
31 public static function getTableName()
32 {
33 return 'b_rest_free_app';
34 }
35
36 public static function getMap()
37 {
38 return [
39 new StringField('APP_CODE', [
40 'primary' => true,
41 ]),
42 (new Reference(
43 'APP',
44 AppTable::class,
45 Join::on('this.APP_CODE', 'ref.CODE')
46 )),
47 ];
48 }
49
50 final public static function updateFreeAppTable(array $freeAppList): void
51 {
52 $connection = Application::getConnection();
53 $connection->startTransaction();
54
55 try
56 {
58 $helper = $connection->getSqlHelper();
59
60 if (!empty($freeAppList))
61 {
62 $values = implode("'),('", $freeAppList);
63 $query = $helper->getInsertIgnore(FreeAppTable::getTableName(), '(APP_CODE)', "VALUES ('$values')");
64 $connection->query($query);
65 }
66 }
67 catch (SqlQueryException $e)
68 {
69 $connection->rollbackTransaction();
70 throw $e;
71 }
72
73 $connection->commitTransaction();
75 }
76}
$connection
Определения actionsdefinitions.php:38
static cleanCache()
Определения datamanager.php:1983
Определения app.php:68
static updateFreeAppTable(array $freeAppList)
Определения FreeAppTable.php:50
static getTableName()
Определения FreeAppTable.php:31
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$query
Определения get_search.php:11