‪TYPO3CMS  ‪main
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 {
28  private bool ‪$stopped = false;
29 
30  public function ‪__construct(
31  private readonly string $tableName,
32  private readonly int ‪$uid,
33  private ?UriInterface $previewUri,
34  private readonly array $contextData
35  ) {}
36 
37  public function ‪stop(): void
38  {
39  $this->stopped = true;
40  }
41 
42  public function ‪isPropagationStopped(): bool
43  {
44  return ‪$this->stopped;
45  }
46 
47  public function ‪getPreviewUri(): ?UriInterface
48  {
49  return $this->previewUri;
50  }
51 
52  public function ‪setPreviewUri(UriInterface $previewUri): void
53  {
54  $this->previewUri = $previewUri;
55  }
56 
57  public function ‪getTableName(): string
58  {
59  return $this->tableName;
60  }
61 
62  public function ‪getUid(): int
63  {
64  return ‪$this->uid;
65  }
66 
67  public function ‪getContextData(): array
68  {
69  return $this->contextData;
70  }
71 }
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent
Definition: RetrievedPreviewUrlEvent.php:27
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\getTableName
‪getTableName()
Definition: RetrievedPreviewUrlEvent.php:57
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\stop
‪stop()
Definition: RetrievedPreviewUrlEvent.php:37
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\getUid
‪getUid()
Definition: RetrievedPreviewUrlEvent.php:62
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\$stopped
‪bool $stopped
Definition: RetrievedPreviewUrlEvent.php:28
‪TYPO3\CMS\Workspaces\Event
Definition: AfterCompiledCacheableDataForWorkspaceEvent.php:18
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\getContextData
‪getContextData()
Definition: RetrievedPreviewUrlEvent.php:67
‪TYPO3\CMS\Webhooks\Message\$uid
‪identifier readonly int $uid
Definition: PageModificationMessage.php:35
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\getPreviewUri
‪getPreviewUri()
Definition: RetrievedPreviewUrlEvent.php:47
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\__construct
‪__construct(private readonly string $tableName, private readonly int $uid, private ?UriInterface $previewUri, private readonly array $contextData)
Definition: RetrievedPreviewUrlEvent.php:30
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\isPropagationStopped
‪isPropagationStopped()
Definition: RetrievedPreviewUrlEvent.php:42
‪TYPO3\CMS\Workspaces\Event\RetrievedPreviewUrlEvent\setPreviewUri
‪setPreviewUri(UriInterface $previewUri)
Definition: RetrievedPreviewUrlEvent.php:52