PHP 클래스 Newscoop\Services\AuthorService

파일 보기 프로젝트 열기: sourcefabric/newscoop

보호된 프로퍼티들

프로퍼티 타입 설명
$em Doctrine\ORM\EntityManager
$repository Doctrine\ORM\EntityRepository

공개 메소드들

메소드 설명
__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

메소드 상세

__construct() 공개 메소드

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

addAuthorToArticle() 공개 메소드

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
리턴 Newscoop\Entity\ArticleAuthor

getAuthors() 공개 메소드

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
리턴 array

getOptions() 공개 메소드

Get author options
public getOptions ( ) : array
리턴 array

removeAuthorFromArticle() 공개 메소드

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
리턴 Newscoop\Entity\ArticleAuthor

reorderAuthors() 공개 메소드

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

프로퍼티 상세

$em 보호되어 있는 프로퍼티

protected EntityManager,Doctrine\ORM $em
리턴 Doctrine\ORM\EntityManager

$repository 보호되어 있는 프로퍼티

protected Doctrine\ORM\EntityRepository $repository
리턴 Doctrine\ORM\EntityRepository