1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
addressservice.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Location\Service
;
4
5
use
Bitrix\Location\Common\BaseService
;
6
use
Bitrix\Location\Common\RepositoryTrait
;
7
use
Bitrix\Location\Entity
;
8
use
Bitrix\Location\Exception\RuntimeException
;
9
use
Bitrix\Location\Infrastructure\Service\Config\Container
;
10
use
Bitrix\Location\Repository\AddressRepository
;
11
use
Bitrix\Main\Localization\Loc
;
12
13
Loc::loadMessages(__FILE__);
14
22
final
class
AddressService
extends
BaseService
23
{
24
use RepositoryTrait;
25
27
protected
static
$instance
;
28
30
protected
$repository
;
31
38
public
function
findById
(
int
$addressId)
39
{
40
$result
=
false
;
41
42
try
43
{
44
$result
= $this->repository->findById($addressId);
45
}
46
catch
(
RuntimeException
$exception)
47
{
48
$this->
processException
($exception);
49
}
50
51
return
$result
;
52
}
53
61
public
function
findByLinkedEntity
(
string
$entityId
,
string
$entityType):
Entity
\
Address
\
AddressCollection
62
{
63
$result
=
false
;
64
65
try
66
{
67
$result
= $this->repository->findByLinkedEntity(
$entityId
, $entityType);
68
}
69
catch
(
RuntimeException
$exception)
70
{
71
$this->
processException
($exception);
72
}
73
74
return
$result
;
75
}
76
83
public
function
save
(
Entity
\
Address
$address)
84
{
85
return
$this->repository->save($address);
86
}
87
94
public
function
delete
(
int
$addressId): \
Bitrix
\
Main
\
ORM
\
Data
\
DeleteResult
95
{
96
return
$this->repository->delete($addressId);
97
}
98
105
public
function
isLimitReached
(): bool
106
{
107
return
false
;
108
}
109
114
protected
function
__construct
(
Container
$config
)
115
{
116
$this->setRepository(
$config
->get(
'repository'
));
117
parent::__construct(
$config
);
118
}
119
}
Bitrix\Location\Common\BaseService
Определения
baseservice.php:11
Bitrix\Location\Common\BaseService\processException
processException(\Exception $exception)
Определения
baseservice.php:38
Bitrix\Location\Entity\Address\AddressCollection
Определения
addresscollection.php:14
Bitrix\Location\Exception\RuntimeException
Определения
runtimeexception.php:6
Bitrix\Location\Infrastructure\Service\Config\Container
Определения
container.php:8
Bitrix\Location\Repository\AddressRepository
Определения
addressrepository.php:16
Bitrix\Location\Service\AddressService
Определения
addressservice.php:23
Bitrix\Location\Service\AddressService\$repository
$repository
Определения
addressservice.php:30
Bitrix\Location\Service\AddressService\__construct
__construct(Container $config)
Определения
addressservice.php:114
Bitrix\Location\Service\AddressService\findByLinkedEntity
findByLinkedEntity(string $entityId, string $entityType)
Определения
addressservice.php:61
Bitrix\Location\Service\AddressService\findById
findById(int $addressId)
Определения
addressservice.php:38
Bitrix\Location\Service\AddressService\isLimitReached
isLimitReached()
Определения
addressservice.php:105
Bitrix\Location\Service\AddressService\save
save(Entity\Address $address)
Определения
addressservice.php:83
Bitrix\Location\Service\AddressService\$instance
static $instance
Определения
addressservice.php:27
Bitrix\Main\Localization\Loc
Определения
loc.php:12
Bitrix\Main\ORM\Data\DeleteResult
Определения
deleteresult.php:12
$result
$result
Определения
get_property_values.php:14
Bitrix\Location\Common\RepositoryTrait
trait RepositoryTrait
Определения
repositorytrait.php:6
Bitrix\Location\Entity\Address
Определения
addresscollection.php:3
Bitrix\Location\Entity
Определения
address.php:3
Bitrix\Location\Service
Определения
addressservice.php:3
Bitrix\Main\Data
Определения
aliases.php:105
Bitrix\Main\Entity
Определения
ufield.php:9
Bitrix\Main\ORM
Bitrix\Main
Bitrix
$entityId
$entityId
Определения
payment.php:4
$config
$config
Определения
quickway.php:69
bitrix
modules
location
lib
service
addressservice.php
Создано системой
1.14.0