public function getContentFromContentElements($contentElements)
    {
        $content = '';

        // get content from content elements
        // NOTE: If the content elements contain links to files, those files will NOT be indexed.
        // NOTE: There's no restriction to certain content element types .
        // All attached content elements will be indexed. Only fields "header" and "bodytext" will be indexed.
        if (count($contentElements)) {
            /* @var $pageIndexerObject Page */
            $pageIndexerObject = GeneralUtility::makeInstance(Page::class, $this->pObj);

            foreach ($contentElements as $contentElement) {
                // index header, add header only if not set to "hidden"
                if ($contentElement['header_layout'] != 100) {
                    $content .= "\n" . strip_tags($contentElement['header']) . "\n";
                }

                // index bodytext (main content)
                $content .= "\n" . $pageIndexerObject->getContentFromContentElement($contentElement);
            }
        }

        return $content;
    }
public function getContentFromContentElements($contentElements)
    {
        $content = '';

        // get content from content elements
        // NOTE: If the content elements contain links to files, those files will NOT be indexed.
        // NOTE: There's no restriction to certain content element types .
        // All attached content elements will be indexed. Only fields "header" and "bodytext" will be indexed.
        if (count($contentElements)) {
            /* @var $pageIndexerObject Page */
            $pageIndexerObject = GeneralUtility::makeInstance(Page::class, $this->pObj);

            foreach ($contentElements as $contentElement) {
                // index header, add header only if not set to "hidden"
                if ($contentElement['header_layout'] != 100) {
                    $content .= "\n" . strip_tags($contentElement['header']) . "\n";
                }

                // index bodytext (main content)
                $content .= "\n" . $pageIndexerObject->getContentFromContentElement($contentElement);
            }
        }

        return $content;
    }
public function getContentFromContentElements ( $ contentElements ) { $ content = '' ; // get content from content elements // NOTE: If the content elements contain links to files, those files will NOT be indexed. // NOTE: There's no restriction to certain content element types . // All attached content elements will be indexed. Only fields "header" and "bodytext" will be indexed. if ( count ( $ contentElements ) ) { /* @var $pageIndexerObject Page */ $ pageIndexerObject = GeneralUtility :: makeInstance ( Page :: class , $ this -> pObj ) ; foreach ( $ contentElements as $ contentElement ) { // index header, add header only if not set to "hidden" if ( $ contentElement [ 'header_layout' ] != 100 ) { $ content .= "\n" . strip_tags ( $ contentElement [ 'header' ] ) . "\n" ; } // index bodytext (main content) $ content .= "\n" . $ pageIndexerObject -> getContentFromContentElement ( $ contentElement ) ; } } return $ content ; }
fetches the bare text content of an array of content elements.
makes use of the already given functions the page indexer provides.

@author Christian Bülter <christian.buelter@inmedias.de>
@since 15.10.15
@param array $contentElements
@return string
fetches the bare text content of an array of content elements . makes use of the already given functions the page indexer provides .