Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Core/SignalSlot/URLService.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\SignalSlot;
8
9 use eZ\Publish\API\Repository\URLService as URLServiceInterface;
10 use eZ\Publish\API\Repository\Values\URL\URL;
11 use eZ\Publish\API\Repository\Values\URL\URLQuery;
12 use eZ\Publish\API\Repository\Values\URL\URLUpdateStruct;
13 use eZ\Publish\Core\SignalSlot\Signal\URLService\UpdateUrlSignal;
14
15 class URLService implements URLServiceInterface
16 {
22 protected $service;
23
29 protected $signalDispatcher;
30
37 public function __construct(URLServiceInterface $service, SignalDispatcher $signalDispatcher)
38 {
39 $this->service = $service;
40 $this->signalDispatcher = $signalDispatcher;
41 }
42
46 public function createUpdateStruct()
47 {
48 return $this->service->createUpdateStruct();
49 }
50
54 public function findUrls(URLQuery $query)
55 {
56 return $this->service->findUrls($query);
57 }
58
62 public function findUsages(URL $url, $offset = 0, $limit = -1)
63 {
64 return $this->service->findUsages($url, $offset, $limit);
65 }
66
70 public function loadById($id)
71 {
72 return $this->service->loadById($id);
73 }
74
78 public function loadByUrl($url)
79 {
80 return $this->service->loadByUrl($url);
81 }
82
86 public function updateUrl(URL $url, URLUpdateStruct $struct)
87 {
88 $returnValue = $this->service->updateUrl($url, $struct);
89
90 $this->signalDispatcher->emit(
91 new UpdateUrlSignal([
92 'urlId' => $returnValue->id,
93 'urlChanged' => $struct->url !== null,
94 ])
95 );
96
97 return $returnValue;
98 }
99 }
eZ\Publish\API\Repository\Values\URL\URLQuery
This class is used to perform a URL query.
Definition: URLQuery.php:15
eZ\Publish\API\Repository\Values\URL\URLUpdateStruct
Structure used to update URL data.
Definition: API/Repository/Values/URL/URLUpdateStruct.php:15
eZ\Publish\API\Repository\Values\URL\URL
Definition: API/Repository/Values/URL/URL.php:12
eZ\Publish\Core\SignalSlot\SignalDispatcher
Dispatches Signals to their assigned Slots.
Definition: SignalDispatcher.php:20
eZ\Publish\Core\SignalSlot\Signal\URLService\UpdateUrlSignal
Signal emitted when URL is updated.
Definition: UpdateUrlSignal.php:15
eZ\Publish\Core\SignalSlot\URLService
Definition: Core/SignalSlot/URLService.php:16
eZ\Publish\Core\SignalSlot\URLService\loadByUrl
loadByUrl($url)
{Load single URL (by URL).}
Definition: Core/SignalSlot/URLService.php:78
eZ\Publish\Core\SignalSlot\URLService\createUpdateStruct
createUpdateStruct()
{Instantiates a new URL update struct.\eZ\Publish\API\Repository\Values\URL\URLUpdateStruct}
Definition: Core/SignalSlot/URLService.php:46
eZ\Publish\Core\SignalSlot\URLService\findUsages
findUsages(URL $url, $offset=0, $limit=-1)
{Find content objects using URL.Content is filter by user permissions.\eZ\Publish\API\Repository\Valu...
Definition: Core/SignalSlot/URLService.php:62
eZ\Publish\Core\SignalSlot\URLService\loadById
loadById($id)
{Load single URL (by ID).}
Definition: Core/SignalSlot/URLService.php:70
eZ\Publish\Core\SignalSlot\URLService\__construct
__construct(URLServiceInterface $service, SignalDispatcher $signalDispatcher)
URLService constructor.
Definition: Core/SignalSlot/URLService.php:37
eZ\Publish\Core\SignalSlot\URLService\$service
$service
Definition: Core/SignalSlot/URLService.php:22
eZ\Publish\Core\SignalSlot\URLService\updateUrl
updateUrl(URL $url, URLUpdateStruct $struct)
{Updates URL.}
Definition: Core/SignalSlot/URLService.php:86
eZ\Publish\Core\SignalSlot\URLService\findUrls
findUrls(URLQuery $query)
{Find URLs.}
Definition: Core/SignalSlot/URLService.php:54
eZ\Publish\Core\SignalSlot\URLService\$signalDispatcher
$signalDispatcher
Definition: Core/SignalSlot/URLService.php:29
eZ\Publish\API\Repository\URLService
URL Service.
Definition: API/Repository/URLService.php:17
eZ\Publish\Core\SignalSlot
Definition: Core/SignalSlot/BookmarkService.php:9
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.