PHP 클래스 Newscoop\Services\UserTopicService

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

보호된 프로퍼티들

프로퍼티 타입 설명
$dispatcher Newscoop\EventDispatcher\EventDispatcher
$em Doctrine\ORM\EntityManager

공개 메소드들

메소드 설명
__construct ( EntityManager $em, Newscoop\EventDispatcher\EventDispatcher $dispatcher = null )
findTopic ( integer $id ) : Newscoop\NewscoopBundle\Entity\Topic Find topic
followTopic ( User $user, Topic $topic ) : void Follow topic by user
getTopics ( mixed $user, string $locale = null ) : array Get user topics
saveUserTopics ( SaveUserTopicsCommand $command ) : void Save user topics command
unfollowTopic ( User $user, Topic $topic ) : void Unfollow topic
updateTopics ( User $user, array $topics ) : void Update user topics

비공개 메소드들

메소드 설명
notify ( User $user, Topic $topic ) Dispatch event

메소드 상세

__construct() 공개 메소드

public __construct ( EntityManager $em, Newscoop\EventDispatcher\EventDispatcher $dispatcher = null )
$em Doctrine\ORM\EntityManager
$dispatcher Newscoop\EventDispatcher\EventDispatcher

findTopic() 공개 메소드

Find topic
public findTopic ( integer $id ) : Newscoop\NewscoopBundle\Entity\Topic
$id integer
리턴 Newscoop\NewscoopBundle\Entity\Topic

followTopic() 공개 메소드

Follow topic by user
public followTopic ( User $user, Topic $topic ) : void
$user Newscoop\Entity\User
$topic Newscoop\NewscoopBundle\Entity\Topic
리턴 void

getTopics() 공개 메소드

Get user topics
public getTopics ( mixed $user, string $locale = null ) : array
$user mixed User id or object
$locale string Current locale
리턴 array

saveUserTopics() 공개 메소드

Save user topics command
public saveUserTopics ( SaveUserTopicsCommand $command ) : void
$command Newscoop\Topic\SaveUserTopicsCommand
리턴 void

unfollowTopic() 공개 메소드

Unfollow topic
public unfollowTopic ( User $user, Topic $topic ) : void
$user Newscoop\Entity\User
$topic Newscoop\NewscoopBundle\Entity\Topic
리턴 void

updateTopics() 공개 메소드

Update user topics
public updateTopics ( User $user, array $topics ) : void
$user Newscoop\Entity\User
$topics array
리턴 void

프로퍼티 상세

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

protected EventDispatcher,Newscoop\EventDispatcher $dispatcher
리턴 Newscoop\EventDispatcher\EventDispatcher

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

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