PHP Class Newscoop\Services\BlogService

Afficher le fichier Open project: sourcefabric/newscoop

Protected Properties

Свойство Type Description
$config array
$em
$getArticleActions array
$postArticleActions array

Méthodes publiques

Méthode Description
__construct ( array $config, EntityManager $em )
createBlog ( string $title, Section $section ) : Article Create blog article
getBlogInfo ( User $user ) : Article | null Get blog info article
getSection ( User $user ) : Section | null Get blog section for given user
isAllowed ( Zend_Controller_Request_Abstract $request, User $user = null ) : boolean Test if blogger is allowed to perform action
isBlogAuthor ( Author $author, Article $blogInfo ) : boolean Test if author is blog author
isBlogger ( User $user ) : boolean Test if user is blogger
isUsersArticle ( Article $article, User $user ) : boolean Test if given article is from users blog

Private Methods

Méthode Description
isRequestedArticleEditable ( Zend_Controller_Request_Abstract $request, User $user ) : boolean Test if requested article is editable by user

Method Details

__construct() public méthode

public __construct ( array $config, EntityManager $em )
$config array
$em Doctrine\ORM\EntityManager

createBlog() public méthode

Create blog article
public createBlog ( string $title, Section $section ) : Article
$title string
$section Section
Résultat Article

getBlogInfo() public méthode

Get blog info article
public getBlogInfo ( User $user ) : Article | null
$user Newscoop\Entity\User
Résultat Article | null

getSection() public méthode

Get blog section for given user
public getSection ( User $user ) : Section | null
$user Newscoop\Entity\User
Résultat Section | null

isAllowed() public méthode

Test if blogger is allowed to perform action
public isAllowed ( Zend_Controller_Request_Abstract $request, User $user = null ) : boolean
$request Zend_Controller_Request_Abstract
$user Newscoop\Entity\User
Résultat boolean

isBlogAuthor() public méthode

Test if author is blog author
public isBlogAuthor ( Author $author, Article $blogInfo ) : boolean
$author Author
$blogInfo Article
Résultat boolean

isBlogger() public méthode

Test if user is blogger
public isBlogger ( User $user ) : boolean
$user Newscoop\Entity\User
Résultat boolean

isUsersArticle() public méthode

Test if given article is from users blog
public isUsersArticle ( Article $article, User $user ) : boolean
$article Article
$user Newscoop\Entity\User
Résultat boolean

Property Details

$config protected_oe property

protected array $config
Résultat array

$em protected_oe property

protected $em

$getArticleActions protected_oe property

protected array $getArticleActions
Résultat array

$postArticleActions protected_oe property

protected array $postArticleActions
Résultat array