Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
factory.php
1
<?php
2
namespace
Bitrix\Calendar\Sharing\Link\Rule
;
3
4
use
Bitrix\Calendar\Sharing\Link
;
5
6
class
Factory
7
{
8
public
function
getRuleBySharingLink
(
Link
\Joint\
JointLink
$sharingLink): ?
Rule
9
{
10
$linkObjectRule = $this->
getLinkObjectRuleByLink
($sharingLink);
11
12
if
(!is_null($linkObjectRule))
13
{
14
return
(
new
Mapper
())->getFromLinkObjectRule($linkObjectRule);
15
}
16
17
return
null
;
18
}
19
20
public
function
getLinkObjectRuleByLink
(
Link
\Joint\
JointLink
$sharingLink): ?
LinkObjectRule
21
{
22
if
($sharingLink instanceof
Link
\
CrmDealLink
)
23
{
24
return
(
new
Link
\
Rule
\
UserCrmDealRule
($sharingLink->getOwnerId()))
25
->
setLinkId
($sharingLink->getId());
26
}
27
28
if
($sharingLink instanceof
Link
\
UserLink
)
29
{
30
return
(
new
Link
\
Rule
\
UserRule
($sharingLink->getUserId()))
31
->setLinkId($sharingLink->getId());
32
}
33
34
return
null
;
35
}
36
}
Bitrix\Calendar\Core\Mappers\Factory
Definition
factory.php:6
Bitrix\Calendar\Core\Mappers\Mapper
Definition
mapper.php:12
Bitrix\Calendar\Sharing\Link\CrmDealLink
Definition
crmdeallink.php:8
Bitrix\Calendar\Sharing\Link\Joint\JointLink
Definition
jointlink.php:9
Bitrix\Calendar\Sharing\Link\Link
Definition
link.php:8
Bitrix\Calendar\Sharing\Link\Rule\Factory\getRuleBySharingLink
getRuleBySharingLink(Link\Joint\JointLink $sharingLink)
Definition
factory.php:8
Bitrix\Calendar\Sharing\Link\Rule\Factory\getLinkObjectRuleByLink
getLinkObjectRuleByLink(Link\Joint\JointLink $sharingLink)
Definition
factory.php:20
Bitrix\Calendar\Sharing\Link\Rule\LinkObjectRule
Definition
linkobjectrule.php:6
Bitrix\Calendar\Sharing\Link\Rule\LinkObjectRule\setLinkId
setLinkId(?int $linkId)
Definition
linkobjectrule.php:21
Bitrix\Calendar\Sharing\Link\Rule\Rule
Definition
rule.php:6
Bitrix\Calendar\Sharing\Link\Rule\UserCrmDealRule
Definition
usercrmdealrule.php:8
Bitrix\Calendar\Sharing\Link\Rule\UserRule
Definition
userrule.php:8
Bitrix\Calendar\Sharing\Link\UserLink
Definition
userlink.php:7
Bitrix\Calendar\Sharing\Link\Rule
Definition
factory.php:2
Bitrix\Calendar\Sharing\Link
Definition
crmdeallink.php:3
modules
calendar
lib
sharing
link
rule
factory.php
Создано системой
1.10.0