1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
| <?php
namespace Example\Together\Typo3;
use TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface;
/**
* Modify the content preview rendering in the backend.
* Remove the content element header and header_layout rendering.
*
* @author Christian Weiske <weiske@mogic.com>
*/
class HideContentHeader implements PageLayoutViewDrawItemHookInterface
{
/**
* Remove "header" and "header_layout" in the backend content preview.
*
* @param object $parentObject Calling parent object
* @param bool $drawItem Whether to draw the item using the
* default functionalities
* @param string $headerContent Header content
* @param string $itemContent Item content
* @param array $row Record row of tt_content
*
* @return void
*/
public function preProcess(
\TYPO3\CMS\Backend\View\PageLayoutView &$parentObject,
&$drawItem, &$headerContent, &$itemContent, array &$row
) {
if ($row['CType'] == 'fluidcontent_content') {
$headerContent = '';
}
}
}
?>
|