/**
     * Renders the HTML code for a single tt_content element
     *
     * @param PageLayoutView $parentObject : The parent object that triggered this hook
     * @param array $itemRow : The data row to be rendered as HTML
     *
     * @return string
     */
    public function renderSingleElementHTML(PageLayoutView $parentObject, $itemRow)
    {
        $singleElementHTML = $parentObject->tt_content_drawHeader($itemRow, $parentObject->tt_contentConfig['showInfo'] ? 15 : 5, $parentObject->defLangBinding && $parentObject->lP > 0, TRUE);
        $isRTE = $parentObject->RTE && $parentObject->isRTEforField('tt_content', $itemRow, 'bodytext');
        $singleElementHTML .= '<div ' . (!empty($itemRow['_ORIG_uid']) ? ' class="ver-element"' : '') . '><div class="t3-page-ce-body-inner t3-page-ce-body-inner-' . $itemRow['CType'] . '">' . $parentObject->tt_content_drawItem($itemRow, $isRTE) . '</div></div>';
        $footerContent = '';
        // Get processed values:
        $info = array();
        $parentObject->getProcessedValue('tt_content', 'starttime,endtime,fe_group,spaceBefore,spaceAfter', $itemRow, $info);
        // Display info from records fields:
        if (count($info)) {
            $footerContent = '<div class="t3-page-ce-info">
				' . implode('<br />', $info) . '
				</div>';
        }
        // Wrap it
        if (!empty($footerContent)) {
            $singleElementHTML .= '<div class="t3-page-ce-footer">' . $footerContent . '</div>';
        }
        return $singleElementHTML;
    }
Exemple #2
0
    /**
     * Renders the HTML code for a single tt_content element
     *
     * @param PageLayoutView $parentObject : The parent object that triggered this hook
     * @param array $itemRow : The data row to be rendered as HTML
     *
     * @return string
     */
    public function renderSingleElementHTML(PageLayoutView $parentObject, $itemRow)
    {
        // @todo $parentObject->lP is gone, defLangBinding is proably not enough for the third param to act correctly
        $singleElementHTML = $parentObject->tt_content_drawHeader($itemRow, $parentObject->tt_contentConfig['showInfo'] ? 15 : 5, $parentObject->defLangBinding, true, true);
        $singleElementHTML .= '<div ' . (!empty($itemRow['_ORIG_uid']) ? ' class="ver-element"' : '') . '><div class="t3-page-ce-body-inner t3-page-ce-body-inner-' . $itemRow['CType'] . '">' . $parentObject->tt_content_drawItem($itemRow) . '</div></div>';
        $footerContent = '';
        // Get processed values:
        $info = array();
        $parentObject->getProcessedValue('tt_content', 'starttime,endtime,fe_group,spaceBefore,spaceAfter', $itemRow, $info);
        // Display info from records fields:
        if (!empty($info)) {
            $footerContent = '<div class="t3-page-ce-info">
				' . implode('<br />', $info) . '
				</div>';
        }
        // Wrap it
        if (!empty($footerContent)) {
            $singleElementHTML .= '<div class="t3-page-ce-footer">' . $footerContent . '</div>';
        }
        return $singleElementHTML;
    }