‪TYPO3CMS  11.5
RetrievedPreviewUrlEvent.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use Psr\EventDispatcher\StoppableEventInterface;
21 use Psr\Http\Message\UriInterface;
22 
26 final class ‪RetrievedPreviewUrlEvent implements StoppableEventInterface
27 {
31  private ‪$tableName;
32 
36  private ‪$uid;
37 
41  private ‪$previewUri;
42 
46  private ‪$contextData;
47 
51  private ‪$stopped = false;
52 
53  public function ‪__construct(string ‪$tableName, int ‪$uid, ?UriInterface ‪$previewUri, array ‪$contextData)
54  {
55  $this->tableName = ‪$tableName;
56  $this->uid = ‪$uid;
57  $this->previewUri = ‪$previewUri;
58  $this->contextData = ‪$contextData;
59  }
60 
61  public function ‪stop(): void
62  {
63  $this->stopped = true;
64  }
65 
66  public function ‪isPropagationStopped(): bool
67  {
68  return ‪$this->stopped;
69  }
70 
74  public function ‪getPreviewUri(): ?UriInterface
75  {
76  return ‪$this->previewUri;
77  }
78 
82  public function ‪setPreviewUri(UriInterface ‪$previewUri): void
83  {
84  $this->previewUri = ‪$previewUri;
85  }
86 
90  public function ‪getTableName(): string
91  {
92  return ‪$this->tableName;
93  }
94 
98  public function ‪getUid(): int
99  {
100  return ‪$this->uid;
101  }
102 
106  public function ‪getContextData(): array
107  {
108  return ‪$this->contextData;
109  }
110 }
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\$contextData
‪array $contextData
Definition: RetrievedPreviewUrlEvent.php:42
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent
Definition: RetrievedPreviewUrlEvent.php:27
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\getContextData
‪array getContextData()
Definition: RetrievedPreviewUrlEvent.php:101
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\__construct
‪__construct(string $tableName, int $uid, ?UriInterface $previewUri, array $contextData)
Definition: RetrievedPreviewUrlEvent.php:48
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\$uid
‪int $uid
Definition: RetrievedPreviewUrlEvent.php:34
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\stop
‪stop()
Definition: RetrievedPreviewUrlEvent.php:56
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\$tableName
‪string $tableName
Definition: RetrievedPreviewUrlEvent.php:30
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\getUid
‪int getUid()
Definition: RetrievedPreviewUrlEvent.php:93
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\$stopped
‪bool $stopped
Definition: RetrievedPreviewUrlEvent.php:46
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\getTableName
‪string getTableName()
Definition: RetrievedPreviewUrlEvent.php:85
‪TYPO3\CMS\Workspaces\Event
Definition: AfterCompiledCacheableDataForWorkspaceEvent.php:18
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\$previewUri
‪UriInterface null $previewUri
Definition: RetrievedPreviewUrlEvent.php:38
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\getPreviewUri
‪UriInterface null getPreviewUri()
Definition: RetrievedPreviewUrlEvent.php:69
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\isPropagationStopped
‪isPropagationStopped()
Definition: RetrievedPreviewUrlEvent.php:61
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\setPreviewUri
‪setPreviewUri(UriInterface $previewUri)
Definition: RetrievedPreviewUrlEvent.php:77