PHP Class Newscoop\Article\SearchService

Inheritance: implements Newscoop\Search\ServiceInterface
Show file Open project: sourcefabric/newscoop

Protected Properties

Property Type Description
$config array
$em Doctrine\ORM\EntityManager
$linkService LinkService
$renditionService Newscoop\Image\RenditionService
$switches array
$webcoder Newscoop\Webcode\Mapper

Public Methods

Method Description
__construct ( WebcodeFacade $webcoder, RenditionService $renditionService, LinkService $linkService, EntityManager $em )
getArticleDatetime ( Article $article ) : ArticleDatetime Get event article datetime
getArticleSwitches ( Article $article ) : array Get article switches
getDocument ( Newscoop\Search\DocumentInterface $article ) : array Get document representation for article
getDocumentId ( Newscoop\Search\DocumentInterface $article ) : string Get document id
getSubType ( Newscoop\Search\DocumentInterface $article ) : string Return sub type for the document
getType ( ) : string Return type for this search service
isIndexable ( Newscoop\Search\DocumentInterface $article ) : boolean Test if article can be indexed
isIndexed ( Newscoop\Search\DocumentInterface $article ) : boolean Test if article is indexed
searchArticles ( $articleSearchCriteria, $onlyPublished = true )

Private Methods

Method Description
addDataFields ( array $doc, $article ) : array Add field properties to document

Method Details

__construct() public method

public __construct ( WebcodeFacade $webcoder, RenditionService $renditionService, LinkService $linkService, EntityManager $em )
$webcoder Newscoop\WebcodeFacade
$renditionService Newscoop\Image\RenditionService
$linkService LinkService
$em Doctrine\ORM\EntityManager

getArticleDatetime() public method

Get event article datetime
public getArticleDatetime ( Article $article ) : ArticleDatetime
$article Newscoop\Entity\Article
return ArticleDatetime

getArticleSwitches() public method

Get article switches
public getArticleSwitches ( Article $article ) : array
$article Newscoop\Entity\Article
return array

getDocument() public method

Get document representation for article
public getDocument ( Newscoop\Search\DocumentInterface $article ) : array
$article Newscoop\Search\DocumentInterface
return array

getDocumentId() public method

Get document id
public getDocumentId ( Newscoop\Search\DocumentInterface $article ) : string
$article Newscoop\Search\DocumentInterface
return string

getSubType() public method

Return sub type for the document
public getSubType ( Newscoop\Search\DocumentInterface $article ) : string
$article Newscoop\Search\DocumentInterface
return string identifier

getType() public method

Return type for this search service
public getType ( ) : string
return string identifier

isIndexable() public method

Test if article can be indexed
public isIndexable ( Newscoop\Search\DocumentInterface $article ) : boolean
$article Newscoop\Search\DocumentInterface
return boolean

isIndexed() public method

Test if article is indexed
public isIndexed ( Newscoop\Search\DocumentInterface $article ) : boolean
$article Newscoop\Search\DocumentInterface
return boolean

searchArticles() public method

public searchArticles ( $articleSearchCriteria, $onlyPublished = true )

Property Details

$config protected property

protected array $config
return array

$em protected property

protected EntityManager,Doctrine\ORM $em
return Doctrine\ORM\EntityManager

$linkService protected property

protected LinkService,Newscoop\Article $linkService
return LinkService

$renditionService protected property

protected RenditionService,Newscoop\Image $renditionService
return Newscoop\Image\RenditionService

$switches protected property

protected array $switches
return array

$webcoder protected property

protected Newscoop\Webcode\Mapper $webcoder
return Newscoop\Webcode\Mapper