1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
userforum.php
См. документацию.
1<?php
2namespace Bitrix\Forum;
3
4use Bitrix\Main;
5use Bitrix\Main\ORM\Fields\Relations\Reference;
6use Bitrix\Main\ORM\Query\Join;
7use Bitrix\Main\Entity;
8
25class UserForumTable extends Main\Entity\DataManager
26{
27 public static function getTableName(): string
28 {
29 return 'b_forum_user_forum';
30 }
31
32 public static function getMap()
33 {
34 return [
35 new Entity\IntegerField('ID', ['autocomplete' => true]),
36 new Entity\IntegerField('USER_ID', ['primary' => true]),
37 new Entity\IntegerField('FORUM_ID', ['primary' => true]),
38 new Entity\DatetimeField('LAST_VISIT'),
39 new Entity\DatetimeField('MAIN_LAST_VISIT'),
40 new Reference('USER', Main\UserTable::class, Join::on('this.USER_ID', 'ref.ID')),
41 new Reference('FORUM_USER', UserTable::class, Join::on('this.USER_ID', 'ref.USER_ID')),
42 ];
43 }
44
45 public static function deleteBatch(array $filter)
46 {
47 $tableName = static::getTableName();
49 $helper = $connection->getSqlHelper();
50
51 $where = [];
52 foreach ($filter as $key => $value)
53 {
54 $where[] = $helper->prepareAssignment($tableName, $key, $value);
55 }
56 $where = implode(' AND ', $where);
57
58 if($where)
59 {
60 $quotedTableName = $helper->quote($tableName);
61 $connection->queryExecute("DELETE FROM {$quotedTableName} WHERE {$where}");
62 }
63 }
64}
$connection
Определения actionsdefinitions.php:38
static getMap()
Определения userforum.php:32
static deleteBatch(array $filter)
Определения userforum.php:45
static getTableName()
Определения userforum.php:27
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