public function getContentFromContentElement($ttContentRow)
    {
        // bodytext
        $bodytext = $ttContentRow['bodytext'];

        // following lines prevents having words one after the other like: HelloAllTogether
        $bodytext = str_replace('<td', ' <td', $bodytext);
        $bodytext = str_replace('<br', ' <br', $bodytext);
        $bodytext = str_replace('<p', ' <p', $bodytext);
        $bodytext = str_replace('<li', ' <li', $bodytext);

        if ($ttContentRow['CType'] == 'table') {
            // replace table dividers with whitespace
            $bodytext = str_replace('|', ' ', $bodytext);
        }
        $bodytext = strip_tags($bodytext);

        // hook for modifiying a content elements content
        if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifyContentFromContentElement'])) {
            foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifyContentFromContentElement'] as
                     $_classRef) {
                $_procObj = &\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($_classRef);
                $_procObj->modifyContentFromContentElement(
                    $bodytext,
                    $ttContentRow,
                    $this
                );
            }
        }

        return $bodytext;
    }
public function getContentFromContentElement($ttContentRow)
    {
        // bodytext
        $bodytext = $ttContentRow['bodytext'];

        // following lines prevents having words one after the other like: HelloAllTogether
        $bodytext = str_replace('<td', ' <td', $bodytext);
        $bodytext = str_replace('<br', ' <br', $bodytext);
        $bodytext = str_replace('<p', ' <p', $bodytext);
        $bodytext = str_replace('<li', ' <li', $bodytext);

        if ($ttContentRow['CType'] == 'table') {
            // replace table dividers with whitespace
            $bodytext = str_replace('|', ' ', $bodytext);
        }
        $bodytext = strip_tags($bodytext);

        // hook for modifiying a content elements content
        if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifyContentFromContentElement'])) {
            foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifyContentFromContentElement'] as
                     $_classRef) {
                $_procObj = &\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($_classRef);
                $_procObj->modifyContentFromContentElement(
                    $bodytext,
                    $ttContentRow,
                    $this
                );
            }
        }

        return $bodytext;
    }
public function getContentFromContentElement ( $ ttContentRow ) { // bodytext $ bodytext = $ ttContentRow [ 'bodytext' ] ; // following lines prevents having words one after the other like: HelloAllTogether $ bodytext = str_replace ( '<td' , ' <td' , $ bodytext ) ; $ bodytext = str_replace ( '<br' , ' <br' , $ bodytext ) ; $ bodytext = str_replace ( '<p' , ' <p' , $ bodytext ) ; $ bodytext = str_replace ( '<li' , ' <li' , $ bodytext ) ; if ( $ ttContentRow [ 'CType' ] == 'table' ) { // replace table dividers with whitespace $ bodytext = str_replace ( '|' , ' ' , $ bodytext ) ; } $ bodytext = strip_tags ( $ bodytext ) ; // hook for modifiying a content elements content if ( is_array ( $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'EXTCONF' ] [ 'ke_search' ] [ 'modifyContentFromContentElement' ] ) ) { foreach ( $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'EXTCONF' ] [ 'ke_search' ] [ 'modifyContentFromContentElement' ] as $ _classRef ) { $ _procObj = & \ TYPO3 \ CMS \ Core \ Utility \ GeneralUtility :: makeInstance ( $ _classRef ) ; $ _procObj -> modifyContentFromContentElement ( $ bodytext , $ ttContentRow , $ this ) ; } } return $ bodytext ; }
Extracts content from content element and returns it as plain text
for writing it directly to the index
@author Christian Bülter <buelter@kennziffer.com>
@since 24.09.13
@param array $ttContentRow content element
@return string
Extracts content from content element and returns it as plain text for writing it directly to the index