1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
SubjectId.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
6
8use CSocNetGroupSubject;
9
11{
12 private static ?int $subjectId = null;
13
14 public function getValue(): int
15 {
16 return $this->getDefaultSubjectId();
17 }
18
19 protected function getDefaultSubjectId(): int
20 {
21 if (static::$subjectId === null)
22 {
23 $subject = CSocNetGroupSubject::GetList(
24 ["SORT"=>"ASC", "NAME" => "ASC"],
25 ["SITE_ID" => SITE_ID],
26 false,
27 false,
28 ["ID", "NAME"],
29 )->fetch();
30
31 static::$subjectId = (int)($subject['ID'] ?? 0);
32 }
33
34 return static::$subjectId;
35 }
36}
const SITE_ID
Определения sonet_set_content_view.php:12