1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
usertopic.php
См. документацию.
1
<?php
2
namespace
Bitrix\Forum;
3
4
use Bitrix\Main\Entity\DataManager;
5
use Bitrix\Main\Type\DateTime;
6
use Bitrix\Main;
7
26
class
UserTopicTable
extends
DataManager
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();
75
$connection
=
Main\Application::getConnection
();
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
$connection
Определения
actionsdefinitions.php:38
Bitrix\Forum\UserTopicTable
Определения
usertopic.php:27
Bitrix\Forum\UserTopicTable\getMap
static getMap()
Определения
usertopic.php:41
Bitrix\Forum\UserTopicTable\deleteBatch
static deleteBatch(array $filter)
Определения
usertopic.php:72
Bitrix\Forum\UserTopicTable\getTableName
static getTableName()
Определения
usertopic.php:33
Bitrix\Main\Application\getConnection
static getConnection($name="")
Определения
application.php:638
Bitrix\Main\ORM\Data\DataManager
Определения
datamanager.php:35
Bitrix\Main\Type\DateTime
Определения
datetime.php:9
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
$key
if(empty($signedUserToken)) $key
Определения
quickway.php:257
bitrix
modules
forum
lib
usertopic.php
Создано системой
1.14.0