PHP Class Newscoop\Services\AuthorService

Afficher le fichier Open project: sourcefabric/newscoop

Protected Properties

Свойство Type Description
$em Doctrine\ORM\EntityManager
$repository Doctrine\ORM\EntityRepository

Méthodes publiques

Méthode Description
__construct ( EntityManager $em )
addAuthorToArticle ( Article $article, Author $author, AuthorType $authorType ) : ArticleAuthor Add author with type to article
getAuthors ( string $term = null, integer $limit = null, boolean $alsoUsers = false ) : array Get authors
getOptions ( ) : array Get author options
removeAuthorFromArticle ( Article $article, Author $author, AuthorType $authorType ) : ArticleAuthor Remove author with type from article
reorderAuthors ( EntityManager $em, array $articleAuthors, array $order = [] ) : boolean Reorder Article Authors

Method Details

__construct() public méthode

public __construct ( EntityManager $em )
$em Doctrine\ORM\EntityManager

addAuthorToArticle() public méthode

Add author with type to article
public addAuthorToArticle ( Article $article, Author $author, AuthorType $authorType ) : ArticleAuthor
$article Newscoop\Entity\Article
$author Newscoop\Entity\Author
$authorType Newscoop\Entity\AuthorType
Résultat Newscoop\Entity\ArticleAuthor

getAuthors() public méthode

Get authors
public getAuthors ( string $term = null, integer $limit = null, boolean $alsoUsers = false ) : array
$term string Search term
$limit integer Max results
$alsoUsers boolean Also return users
Résultat array

getOptions() public méthode

Get author options
public getOptions ( ) : array
Résultat array

removeAuthorFromArticle() public méthode

Remove author with type from article
public removeAuthorFromArticle ( Article $article, Author $author, AuthorType $authorType ) : ArticleAuthor
$article Newscoop\Entity\Article
$author Newscoop\Entity\Author
$authorType Newscoop\Entity\AuthorType
Résultat Newscoop\Entity\ArticleAuthor

reorderAuthors() public méthode

Reorder Article Authors
public reorderAuthors ( EntityManager $em, array $articleAuthors, array $order = [] ) : boolean
$em Doctrine\ORM\EntityManager
$articleAuthors array
$order array
Résultat boolean

Property Details

$em protected_oe property

protected EntityManager,Doctrine\ORM $em
Résultat Doctrine\ORM\EntityManager

$repository protected_oe property

protected Doctrine\ORM\EntityRepository $repository
Résultat Doctrine\ORM\EntityRepository