1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
usertopic.php
См. документацию.
1<?php
2namespace Bitrix\Forum;
3
4use Bitrix\Main\Entity\DataManager;
5use Bitrix\Main\Type\DateTime;
6use Bitrix\Main;
7
27{
33 public static function getTableName(): string
34 {
35 return 'b_forum_user_topic';
36 }
37
41 public static function getMap(): array
42 {
43 return [
44 'ID' => [
45 'data_type' => 'integer',
46 'autocomplete' => true,
47 ],
48 'TOPIC_ID' => [
49 'data_type' => 'integer',
50 'primary' => true,
51 'required' => true,
52 ],
53 'USER_ID' => [
54 'data_type' => 'integer',
55 'primary' => true,
56 'required' => true,
57 ],
58 'FORUM_ID' => [
59 'data_type' => 'integer',
60 'required' => true,
61 ],
62 'LAST_VISIT' => [
63 'data_type' => 'datetime',
64 'required' => true,
65 'default_value' => static function() {
66 return new DateTime();
67 },
68 ],
69 ];
70 }
71
72 public static function deleteBatch(array $filter)
73 {
74 $tableName = static::getTableName();
76 $helper = $connection->getSqlHelper();
77
78 $where = [];
79 foreach ($filter as $key => $value)
80 {
81 $where[] = $helper->prepareAssignment($tableName, $key, $value);
82 }
83 $where = implode(' AND ', $where);
84
85 if($where)
86 {
87 $quotedTableName = $helper->quote($tableName);
88 $connection->queryExecute("DELETE FROM {$quotedTableName} WHERE {$where}");
89 }
90 }
91}
$connection
Определения actionsdefinitions.php:38
static getMap()
Определения usertopic.php:41
static deleteBatch(array $filter)
Определения usertopic.php:72
static getTableName()
Определения usertopic.php:33
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
$filter
Определения iblock_catalog_list.php:54
if(empty($signedUserToken)) $key
Определения quickway.php:257