public function preProcess(PageLayoutView &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row)
    {
        if ($row['CType']) {
            $this->showHidden = $parentObject->tt_contentConfig['showHidden'] ? true : false;

            if ($this->helper->getBackendUser()->uc['hideContentPreview']) {
                $itemContent = '';
                $drawItem = false;
            }

            switch ($row['CType']) {
                case 'gridelements_pi1':
                    $drawItem = false;
                    $itemContent .= $this->renderCTypeGridelements($parentObject, $row);
                    $refIndexObj = GeneralUtility::makeInstance(ReferenceIndex::class);
                    /* @var $refIndexObj \TYPO3\CMS\Core\Database\ReferenceIndex */
                    $refIndexObj->updateRefIndexTable('tt_content', (int)$row['uid']);
                    break;
                case 'shortcut':
                    $drawItem = false;
                    $itemContent .= $this->renderCTypeShortcut($parentObject, $row);
                    break;
            }
        }
        $listType = $row['list_type'] && $row['CType'] === 'list' ? ' data-list_type="' . $row['list_type'] . '"' : '';
        $gridType = $row['tx_gridelements_backend_layout'] && $row['CType'] === 'gridelements_pi1' ? ' data-tx_gridelements_backend_layout="' . $row['tx_gridelements_backend_layout'] . '"' : '';
        $headerContent = '<div id="element-tt_content-' . $row['uid'] . '" class="t3-ctype-identifier " data-ctype="' . $row['CType'] . '" ' . $listType . $gridType . '>' . $headerContent . '</div>';
    }
public function preProcess(PageLayoutView &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row)
    {
        if ($row['CType']) {
            $this->showHidden = $parentObject->tt_contentConfig['showHidden'] ? true : false;

            if ($this->helper->getBackendUser()->uc['hideContentPreview']) {
                $itemContent = '';
                $drawItem = false;
            }

            switch ($row['CType']) {
                case 'gridelements_pi1':
                    $drawItem = false;
                    $itemContent .= $this->renderCTypeGridelements($parentObject, $row);
                    $refIndexObj = GeneralUtility::makeInstance(ReferenceIndex::class);
                    /* @var $refIndexObj \TYPO3\CMS\Core\Database\ReferenceIndex */
                    $refIndexObj->updateRefIndexTable('tt_content', (int)$row['uid']);
                    break;
                case 'shortcut':
                    $drawItem = false;
                    $itemContent .= $this->renderCTypeShortcut($parentObject, $row);
                    break;
            }
        }
        $listType = $row['list_type'] && $row['CType'] === 'list' ? ' data-list_type="' . $row['list_type'] . '"' : '';
        $gridType = $row['tx_gridelements_backend_layout'] && $row['CType'] === 'gridelements_pi1' ? ' data-tx_gridelements_backend_layout="' . $row['tx_gridelements_backend_layout'] . '"' : '';
        $headerContent = '<div id="element-tt_content-' . $row['uid'] . '" class="t3-ctype-identifier " data-ctype="' . $row['CType'] . '" ' . $listType . $gridType . '>' . $headerContent . '</div>';
    }
public function preProcess ( PageLayoutView & $ parentObject , & $ drawItem , & $ headerContent , & $ itemContent , array & $ row ) { if ( $ row [ 'CType' ] ) { $ this -> showHidden = $ parentObject -> tt_contentConfig [ 'showHidden' ] ? true : false ; if ( $ this -> helper -> getBackendUser ( ) -> uc [ 'hideContentPreview' ] ) { $ itemContent = '' ; $ drawItem = false ; } switch ( $ row [ 'CType' ] ) { case 'gridelements_pi1' : $ drawItem = false ; $ itemContent .= $ this -> renderCTypeGridelements ( $ parentObject , $ row ) ; $ refIndexObj = GeneralUtility :: makeInstance ( ReferenceIndex :: class ) ; /* @var $refIndexObj \TYPO3\CMS\Core\Database\ReferenceIndex */ $ refIndexObj -> updateRefIndexTable ( 'tt_content' , ( int ) $ row [ 'uid' ] ) ; break ; case 'shortcut' : $ drawItem = false ; $ itemContent .= $ this -> renderCTypeShortcut ( $ parentObject , $ row ) ; break ; } } $ listType = $ row [ 'list_type' ] && $ row [ 'CType' ] === 'list' ? ' data-list_type="' . $ row [ 'list_type' ] . '"' : '' ; $ gridType = $ row [ 'tx_gridelements_backend_layout' ] && $ row [ 'CType' ] === 'gridelements_pi1' ? ' data-tx_gridelements_backend_layout="' . $ row [ 'tx_gridelements_backend_layout' ] . '"' : '' ; $ headerContent = '<div id="element-tt_content-' . $ row [ 'uid' ] . '" class="t3-ctype-identifier " data-ctype="' . $ row [ 'CType' ] . '" ' . $ listType . $ gridType . '>' . $ headerContent . '</div>' ; }
Processes the item to be rendered before the actual example content gets rendered
Deactivates the original example content output

@param PageLayoutView $parentObject : The parent object that triggered this hook
@param bool $drawItem : A switch to tell the parent object, if the item still must be drawn
@param string $headerContent : The content of the item header
@param string $itemContent : The content of the item itself
@param array $row : The current data row for this item

@return void
Processes the item to be rendered before the actual example content gets rendered Deactivates the original example content output