1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
userforum.php
См. документацию.
1
<?php
2
namespace
Bitrix\Forum;
3
4
use Bitrix\Main;
5
use Bitrix\Main\ORM\Fields\Relations\Reference;
6
use Bitrix\Main\ORM\Query\Join;
7
use Bitrix\Main\Entity;
8
25
class
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();
48
$connection
=
Main\Application::getConnection
();
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
$connection
Определения
actionsdefinitions.php:38
Bitrix\Forum\UserForumTable
Определения
userforum.php:26
Bitrix\Forum\UserForumTable\getMap
static getMap()
Определения
userforum.php:32
Bitrix\Forum\UserForumTable\deleteBatch
static deleteBatch(array $filter)
Определения
userforum.php:45
Bitrix\Forum\UserForumTable\getTableName
static getTableName()
Определения
userforum.php:27
Bitrix\Main\Application\getConnection
static getConnection($name="")
Определения
application.php:638
Bitrix\Main\ORM\Fields\Relations\Reference
Определения
reference.php:26
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$filter
$filter
Определения
iblock_catalog_list.php:54
Bitrix\Main
$key
if(empty($signedUserToken)) $key
Определения
quickway.php:257
bitrix
modules
forum
lib
userforum.php
Создано системой
1.14.0