mapContent() public method

Map given Content to a FullTextValue.
public mapContent ( eZ\Publish\SPI\Persistence\Content $content ) : FullTextData
$content eZ\Publish\SPI\Persistence\Content
return eZ\Publish\Core\Search\Legacy\Content\FullTextData
Example #1
0
 /**
  * Bulk index list of content objects.
  *
  * @param \eZ\Publish\SPI\Persistence\Content[] $contentList
  * @param callable $errorCallback (Content $content, NotFoundException $e)
  */
 public function bulkIndex(array $contentList, callable $errorCallback)
 {
     $fullTextBulkData = [];
     foreach ($contentList as $content) {
         try {
             $fullTextBulkData[] = $this->mapper->mapContent($content);
         } catch (NotFoundException $e) {
             $errorCallback($content, $e);
         }
     }
     $this->indexerGateway->bulkIndex($fullTextBulkData);
 }