‪TYPO3CMS  ‪main
ModifyCacheLifetimeForPageEvent.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 
21 
27 {
28  public function ‪__construct(
29  private int $cacheLifetime,
30  private readonly int $pageId,
31  private readonly array $pageRecord,
32  private readonly array $renderingInstructions,
33  private readonly ‪Context $context
34  ) {}
35 
36  public function ‪setCacheLifetime(int $cacheLifetime): void
37  {
38  $this->cacheLifetime = $cacheLifetime;
39  }
40 
41  public function ‪getCacheLifetime(): int
42  {
43  return $this->cacheLifetime;
44  }
45 
46  public function ‪getPageId(): int
47  {
48  return $this->pageId;
49  }
50 
51  public function ‪getPageRecord(): array
52  {
53  return $this->pageRecord;
54  }
55 
56  public function ‪getRenderingInstructions(): array
57  {
58  return $this->renderingInstructions;
59  }
60 
61  public function ‪getContext(): ‪Context
62  {
63  return $this->context;
64  }
65 }
‪TYPO3\CMS\Frontend\Event
Definition: AfterCacheableContentIsGeneratedEvent.php:18
‪TYPO3\CMS\Frontend\Event\ModifyCacheLifetimeForPageEvent\getRenderingInstructions
‪getRenderingInstructions()
Definition: ModifyCacheLifetimeForPageEvent.php:56
‪TYPO3\CMS\Core\Context\Context
Definition: Context.php:54
‪TYPO3\CMS\Frontend\Event\ModifyCacheLifetimeForPageEvent\getContext
‪getContext()
Definition: ModifyCacheLifetimeForPageEvent.php:61
‪TYPO3\CMS\Frontend\Event\ModifyCacheLifetimeForPageEvent\getPageRecord
‪getPageRecord()
Definition: ModifyCacheLifetimeForPageEvent.php:51
‪TYPO3\CMS\Frontend\Event\ModifyCacheLifetimeForPageEvent\setCacheLifetime
‪setCacheLifetime(int $cacheLifetime)
Definition: ModifyCacheLifetimeForPageEvent.php:36
‪TYPO3\CMS\Frontend\Event\ModifyCacheLifetimeForPageEvent\__construct
‪__construct(private int $cacheLifetime, private readonly int $pageId, private readonly array $pageRecord, private readonly array $renderingInstructions, private readonly Context $context)
Definition: ModifyCacheLifetimeForPageEvent.php:28
‪TYPO3\CMS\Frontend\Event\ModifyCacheLifetimeForPageEvent\getPageId
‪getPageId()
Definition: ModifyCacheLifetimeForPageEvent.php:46
‪TYPO3\CMS\Frontend\Event\ModifyCacheLifetimeForPageEvent
Definition: ModifyCacheLifetimeForPageEvent.php:27
‪TYPO3\CMS\Frontend\Event\ModifyCacheLifetimeForPageEvent\getCacheLifetime
‪getCacheLifetime()
Definition: ModifyCacheLifetimeForPageEvent.php:41