1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
delete.php
См. документацию.
1<?php
2
3namespace Bitrix\Location\Repository\Location\Strategy;
4
5use Bitrix\Location\Entity\Location;
6use Bitrix\Location\Repository\Location\Capability\IDelete;
7use Bitrix\Location\Repository\Location\IRepository;
8use Bitrix\Main\Result;
9
14class Delete
15 extends Base
16 implements IDelete
17{
19 protected $locationRepositories = [];
20
23 {
24 foreach($locationRepositories as $repository)
25 {
26 if($repository instanceof IDelete)
27 {
28 $this->locationRepositories[] = $repository;
29 }
30 }
31
32 return $this;
33 }
34
39 public function delete(Location $location): Result
40 {
41 $result = new Result();
42
44 foreach($this->locationRepositories as $repository)
45 {
46 $res = $repository->delete($location);
47
48 if(!$res->isSuccess())
49 {
50 $result->addErrors($res->getErrors());
51 }
52 }
53
54 return $result;
55 }
56}
setLocationRepositories(array $locationRepositories)
Определения delete.php:22
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
$result
Определения get_property_values.php:14
$location
Определения options.php:2729