• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

fnagel / t3extblog / 23823603081

31 Mar 2026 11:05PM UTC coverage: 37.437% (-12.6%) from 50.045%
23823603081

push

github

fnagel
[FEATURE] Add YAML lint to composer scripts and CI

Using the new TYPO3 14.2 built in YAML linter.

https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.3/Feature-104973-ActivateLintYamlExecutableForTYPO3.html

1256 of 3355 relevant lines covered (37.44%)

3.11 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.75
/Classes/ViewHelpers/Frontend/FlashMessagesClearCacheViewHelper.php
1
<?php
2

3
namespace FelixNagel\T3extblog\ViewHelpers\Frontend;
4

5
/**
6
 * This file is part of the "t3extblog" Extension for TYPO3 CMS.
7
 *
8
 * For the full copyright and license information, please read the
9
 * LICENSE.txt file that was distributed with this source code.
10
 */
11

12
use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
13
use TYPO3\CMS\Core\Messaging\FlashMessageService;
14
use TYPO3\CMS\Core\Utility\GeneralUtility;
15
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
16
use FelixNagel\T3extblog\Utility\FrontendUtility;
17

18
/**
19
 * View helper to fix flash message caching issue
20
 *
21
 * https://github.com/fnagel/t3extblog/issues/112
22
 *
23
 * Usage:
24
 *
25
 * <t3b:flashMessagesClearCache />
26
 * <f:flashMessages />
27
 */
28
class FlashMessagesClearCacheViewHelper extends AbstractViewHelper
29
{
30
    public function initializeArguments(): void
1✔
31
    {
32
        parent::initializeArguments();
1✔
33
        $this->registerArgument(
1✔
34
            'queueIdentifier',
1✔
35
            'string',
1✔
36
            'Flash-message queue to use',
1✔
37
            false,
1✔
38
            'extbase.flashmessages.tx_t3extblog_blogsystem'
1✔
39
        );
1✔
40
    }
41

42
    /**
43
     * Fix flash message caching
44
     *
45
     * @todo Core bug, see https://github.com/fnagel/t3extblog/issues/112
46
     */
47
    public function render(): void
5✔
48
    {
49
        $queueIdentifier = $this->arguments['queueIdentifier'] ?? FlashMessageQueue::FLASHMESSAGE_QUEUE;
5✔
50
        $flashMessages = GeneralUtility::makeInstance(FlashMessageService::class)
5✔
51
            ->getMessageQueueByIdentifier($queueIdentifier)
5✔
52
            ->getAllMessages();
5✔
53

54
        if (count($flashMessages) > 0) {
5✔
55
            FrontendUtility::disableFrontendCache();
×
56
        }
57
    }
58
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc