‪TYPO3CMS  10.4
PageLayoutViewDrawEmptyColposContent.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 
26 {
27  public function ‪__invoke(‪AfterSectionMarkupGeneratedEvent $event): void
28  {
29  if (
30  !isset($event->‪getColumnConfig()['colPos'])
31  || trim((string)$event->‪getColumnConfig()['colPos']) === ''
32  ) {
33  $content = $event->‪getContent();
34  $content .= <<<EOD
35  <div data-colpos="1" data-language-uid="0" class="t3-page-ce-wrapper">
36  <div class="t3-page-ce">
37  <div class="t3-page-ce-header">Empty Colpos</div>
38  <div class="t3-page-ce-body">
39  <div class="t3-page-ce-body-inner">
40  <div class="row">
41  <div class="col-xs-12">
42  This column has no "colPos". This is only for display Purposes.
43  </div>
44  </div>
45  </div>
46  </div>
47  </div>
48  </div>
49 EOD;
50 
51  $event->‪setContent($content);
52  }
53  }
54 }
‪TYPO3\CMS\Backend\View\Event\AbstractSectionMarkupGeneratedEvent\getContent
‪getContent()
Definition: AbstractSectionMarkupGeneratedEvent.php:72
‪TYPO3\CMS\Backend\View
Definition: ArrayBrowser.php:18
‪TYPO3\CMS\Backend\View\Event\AfterSectionMarkupGeneratedEvent
Definition: AfterSectionMarkupGeneratedEvent.php:25
‪TYPO3\CMS\Backend\View\PageLayoutViewDrawEmptyColposContent
Definition: PageLayoutViewDrawEmptyColposContent.php:26
‪TYPO3\CMS\Backend\View\Event\AbstractSectionMarkupGeneratedEvent\getColumnConfig
‪getColumnConfig()
Definition: AbstractSectionMarkupGeneratedEvent.php:62
‪TYPO3\CMS\Backend\View\Event\AbstractSectionMarkupGeneratedEvent\setContent
‪setContent(string $content='')
Definition: AbstractSectionMarkupGeneratedEvent.php:67
‪TYPO3\CMS\Backend\View\PageLayoutViewDrawEmptyColposContent\__invoke
‪__invoke(AfterSectionMarkupGeneratedEvent $event)
Definition: PageLayoutViewDrawEmptyColposContent.php:27