1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
Forum.php
См. документацию.
1
<?php
2
namespace
Bitrix\Seo\Sitemap\Source
;
3
4
use
Bitrix\Seo\Sitemap\Internals\ForumTable
;
5
use
Bitrix\Seo\Sitemap\Job
;
6
7
class
Forum
8
{
9
public
static
function
__callStatic
(
$name
, $arguments)
10
{
11
$name
= mb_strtoupper(
$name
);
12
switch
(
$name
)
13
{
14
case
'ADDTOPIC'
:
15
case
'UPDATETOPIC'
:
16
case
'DELETETOPIC'
:
17
18
if
(
19
isset($arguments[0])
20
&& (
int
)$arguments[0]
21
&& (!isset($arguments[1][
"APPROVED"
]) || $arguments[1][
"APPROVED"
] ===
'Y'
))
22
{
23
self::processTopic
($arguments[0]);
24
}
25
26
break
;
27
}
28
}
29
30
protected
static
function
processTopic
(
int
$topicId): void
31
{
32
$topic =
\CForumTopic::GetByID
($topicId);
33
$forumsForSitemap = ForumTable::query()
34
->setSelect([
'SITEMAP_ID'
])
35
->where(
'ENTITY_ID'
, $topic[
'FORUM_ID'
])
36
->exec()
37
;
38
39
foreach
($forumsForSitemap as $forum)
40
{
41
Job::markToRegenerate
($forum[
'SITEMAP_ID'
]);
42
}
43
}
44
}
Bitrix\Seo\Sitemap\Internals\ForumTable
Определения
Forum.php:6
Bitrix\Seo\Sitemap\Job
Определения
Job.php:20
Bitrix\Seo\Sitemap\Job\markToRegenerate
static markToRegenerate(int $sitemapId)
Определения
Job.php:199
Bitrix\Seo\Sitemap\Source\Forum
Определения
Forum.php:8
Bitrix\Seo\Sitemap\Source\Forum\processTopic
static processTopic(int $topicId)
Определения
Forum.php:30
Bitrix\Seo\Sitemap\Source\Forum\__callStatic
static __callStatic($name, $arguments)
Определения
Forum.php:9
CAllForumTopic\GetByID
static GetByID($ID, $arAddParams=array())
Определения
topic.php:431
$name
$name
Определения
menu_edit.php:35
Bitrix\Seo\Sitemap\Source
Определения
Forum.php:2
bitrix
modules
seo
lib
Sitemap
Source
Forum.php
Создано системой
1.14.0