Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
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
Definition
Forum.php:6
Bitrix\Seo\Sitemap\Job
Definition
Job.php:20
Bitrix\Seo\Sitemap\Job\markToRegenerate
static markToRegenerate(int $sitemapId)
Definition
Job.php:199
Bitrix\Seo\Sitemap\Source\Forum
Definition
Forum.php:8
Bitrix\Seo\Sitemap\Source\Forum\processTopic
static processTopic(int $topicId)
Definition
Forum.php:30
Bitrix\Seo\Sitemap\Source\Forum\__callStatic
static __callStatic($name, $arguments)
Definition
Forum.php:9
Bitrix\Seo\Sitemap\Source
Definition
Forum.php:2
modules
seo
lib
Sitemap
Source
Forum.php
Создано системой
1.10.0