1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
calendarentity.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Forum\Comments;
4
5
use Bitrix\Main\Config\Option;
6
use Bitrix\Main\Loader;
7
8
final
class
CalendarEntity
extends
Entity
9
{
10
public
const
ENTITY_TYPE
=
'ev'
;
11
const
MODULE_ID
=
'calendar'
;
12
public
const
XML_ID_PREFIX
=
'EVENT_'
;
13
14
protected
static
$permissions
=
array
();
15
16
private
$canRead =
null
;
21
public
function
canRead
(
$userId
)
22
{
23
if
($this->
canRead
!==
null
)
24
{
25
return
$this->canRead
;
26
}
27
$this->
canRead
= \CCalendarEvent::canView($this->
getId
(),
$userId
);
28
29
return
$this->canRead
;
30
}
31
35
public
function
canAdd
(
$userId
)
36
{
37
return
$this->
canRead
(
$userId
);
38
}
39
44
public
function
canEditOwn
(
$userId
)
45
{
46
return
true
;
47
}
48
53
public
function
canEdit
(
$userId
)
54
{
55
return
false
;
56
}
57
64
public
static
function
onMessageIsIndexed
($id,
array
$message
,
array
&$index)
65
{
66
// not index yet because I do not have API from Calendar
67
return
false
;
68
69
if
(!empty(
$message
[
"PARAM1"
]) || !empty(
$message
[
"PARAM2"
]))
70
return
false
;
71
72
if
(
73
preg_match(
"/"
.self::getXmlIdPrefix().
"(\\d+)(*.?)/"
,
$message
[
"XML_ID"
],
$matches
) &&
74
($eventId = intval(
$matches
[1])) &&
75
$eventId > 0
76
)
77
{
78
if
(!array_key_exists($eventId, self::$permissions))
79
{
80
self::$permissions[$eventId] =
array
();
81
}
82
$index[
"PERMISSIONS"
] = self::$permissions[$eventId];
83
}
84
return
true
;
85
}
86
}
$userId
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения
check_mail.php:18
Bitrix\Forum\Comments\CalendarEntity
Определения
calendarentity.php:9
Bitrix\Forum\Comments\CalendarEntity\canEdit
canEdit($userId)
Определения
calendarentity.php:53
Bitrix\Forum\Comments\CalendarEntity\XML_ID_PREFIX
const XML_ID_PREFIX
Определения
calendarentity.php:12
Bitrix\Forum\Comments\CalendarEntity\MODULE_ID
const MODULE_ID
Определения
calendarentity.php:11
Bitrix\Forum\Comments\CalendarEntity\onMessageIsIndexed
static onMessageIsIndexed($id, array $message, array &$index)
Определения
calendarentity.php:64
Bitrix\Forum\Comments\CalendarEntity\canRead
canRead($userId)
Определения
calendarentity.php:21
Bitrix\Forum\Comments\CalendarEntity\canAdd
canAdd($userId)
Определения
calendarentity.php:35
Bitrix\Forum\Comments\CalendarEntity\ENTITY_TYPE
const ENTITY_TYPE
Определения
calendarentity.php:10
Bitrix\Forum\Comments\CalendarEntity\$permissions
static $permissions
Определения
calendarentity.php:14
Bitrix\Forum\Comments\CalendarEntity\canEditOwn
canEditOwn($userId)
Определения
calendarentity.php:44
Bitrix\Forum\Comments\Entity\getId
getId()
Определения
entity.php:45
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
Bitrix\Main\Entity
Определения
ufield.php:9
$message
$message
Определения
payment.php:8
$matches
$matches
Определения
index.php:22
$canRead
$canRead
Определения
options.php:9
bitrix
modules
forum
lib
comments
calendarentity.php
Создано системой
1.14.0