public function generateSearchText($content)
    {
        $searchText = '';
        $repeaterRows = PageBlockRepeaterData::loadRepeaterData($content, $this->_block->getVersionId());
        $repeaterBlocks = BlockRepeater::getRepeaterBlocks($this->_block->id);

        foreach ($repeaterRows as $rowId => $repeaterRow) {
            foreach ($repeaterBlocks as $blockId => $repeaterBlock) {
                if(($blockContent = array_key_exists($blockId, $repeaterRow) ? $repeaterRow[$blockId] : null) !== null) {
                    $block = Block::preloadClone($blockId)->setRepeaterData($this->_block->getRepeaterId(), $this->_block->getRepeaterRowId())->setPageId($this->_block->getPageId());
                    if ($block->exists && $block->search_weight > 0) {
                        $blockSearchText = $block->getTypeObject()->generateSearchText($blockContent);
                        $searchText .= ($blockSearchText !== null) ? $blockSearchText . "\n" : '';
                    }
                }
            }
        }

        return parent::generateSearchText($searchText);
    }
public function generateSearchText($content)
    {
        $searchText = '';
        $repeaterRows = PageBlockRepeaterData::loadRepeaterData($content, $this->_block->getVersionId());
        $repeaterBlocks = BlockRepeater::getRepeaterBlocks($this->_block->id);

        foreach ($repeaterRows as $rowId => $repeaterRow) {
            foreach ($repeaterBlocks as $blockId => $repeaterBlock) {
                if(($blockContent = array_key_exists($blockId, $repeaterRow) ? $repeaterRow[$blockId] : null) !== null) {
                    $block = Block::preloadClone($blockId)->setRepeaterData($this->_block->getRepeaterId(), $this->_block->getRepeaterRowId())->setPageId($this->_block->getPageId());
                    if ($block->exists && $block->search_weight > 0) {
                        $blockSearchText = $block->getTypeObject()->generateSearchText($blockContent);
                        $searchText .= ($blockSearchText !== null) ? $blockSearchText . "\n" : '';
                    }
                }
            }
        }

        return parent::generateSearchText($searchText);
    }
public function generateSearchText ( $ content ) { $ searchText = '' ; $ repeaterRows = PageBlockRepeaterData :: loadRepeaterData ( $ content , $ this -> _block -> getVersionId ( ) ) ; $ repeaterBlocks = BlockRepeater :: getRepeaterBlocks ( $ this -> _block -> id ) ; foreach ( $ repeaterRows as $ rowId => $ repeaterRow ) { foreach ( $ repeaterBlocks as $ blockId => $ repeaterBlock ) { if ( ( $ blockContent = array_key_exists ( $ blockId , $ repeaterRow ) ? $ repeaterRow [ $ blockId ] : null ) !== null ) { $ block = Block :: preloadClone ( $ blockId ) -> setRepeaterData ( $ this -> _block -> getRepeaterId ( ) , $ this -> _block -> getRepeaterRowId ( ) ) -> setPageId ( $ this -> _block -> getPageId ( ) ) ; if ( $ block -> exists && $ block -> search_weight > 0 ) { $ blockSearchText = $ block -> getTypeObject ( ) -> generateSearchText ( $ blockContent ) ; $ searchText .= ( $ blockSearchText !== null ) ? $ blockSearchText . "\n" : '' ; } } } } return parent :: generateSearchText ( $ searchText ) ; }
Get search text from repeater blocks
@param null|string $content
@return null|string
Get search text from repeater blocks