PHP Class Newscoop\Entity\Repository\Snippet\SnippetTemplateRepository

Inheritance: extends Doctrine\ORM\EntityRepository
Show file Open project: sourcefabric/newscoop

Public Methods

Method Description
deleteSnippetTemplate ( $id, $force = false )
findSnippetTemplatesByName ( string $name, string $show = 'enabled', boolean $fuzzy = false ) : Doctrine\ORM\Query Find SnippetTemplate by Name
getCurrentlyUsed ( ) : Doctrine\ORM\Query Get Active SnippetTemplates
getDisabled ( ) : Doctrine\ORM\Query Get Disabled SnippetTemplates
getEnabled ( ) : Doctrine\ORM\Query Get Enabled SnippetTemplates
getFavourites ( ) : Doctrine\ORM\Query Get Favourited SnippetTemplates
getPrototype ( ) : SnippetTemplate Get new instance of the Snippet
getSnippetTemplateQueryBuilder ( $show )
getSnippetTemplatesForArticle ( $articleNr, $languageCode, string $show = 'enabled' ) : Doctrine\ORM\Query Get SnippetsTemplates for Article
getTemplateById ( integer $id, string $show = 'enabled' ) : SnippetTemplate Get SnippetTemplate by ID
save ( SnippetTemplate $snippetTemplate )

Method Details

deleteSnippetTemplate() public method

public deleteSnippetTemplate ( $id, $force = false )

findSnippetTemplatesByName() public method

Find SnippetTemplate by Name
public findSnippetTemplatesByName ( string $name, string $show = 'enabled', boolean $fuzzy = false ) : Doctrine\ORM\Query
$name string SnippetTemplate Name
$show string Define which Snippets to return, 'enabled' | 'disabled' | 'all'
$fuzzy boolean Find fuzzy or not
return Doctrine\ORM\Query Query

getCurrentlyUsed() public method

Get Active SnippetTemplates
public getCurrentlyUsed ( ) : Doctrine\ORM\Query
return Doctrine\ORM\Query Query

getDisabled() public method

Get Disabled SnippetTemplates
public getDisabled ( ) : Doctrine\ORM\Query
return Doctrine\ORM\Query Query

getEnabled() public method

Get Enabled SnippetTemplates
public getEnabled ( ) : Doctrine\ORM\Query
return Doctrine\ORM\Query Query

getFavourites() public method

Get Favourited SnippetTemplates
public getFavourites ( ) : Doctrine\ORM\Query
return Doctrine\ORM\Query Query

getPrototype() public method

Get new instance of the Snippet
public getPrototype ( ) : SnippetTemplate
return Newscoop\Entity\Snippet\SnippetTemplate

getSnippetTemplateQueryBuilder() public method

getSnippetTemplatesForArticle() public method

Returns all the SnippetsTemplates associated to the Snippets for an Article.
public getSnippetTemplatesForArticle ( $articleNr, $languageCode, string $show = 'enabled' ) : Doctrine\ORM\Query
$show string Define which Snippets to return, 'enabled' | 'disabled' | 'all'
return Doctrine\ORM\Query Query

getTemplateById() public method

Get SnippetTemplate by ID
public getTemplateById ( integer $id, string $show = 'enabled' ) : SnippetTemplate
$id integer SnippetTemplate ID
$show string Define which Snippets to return, 'enabled' | 'disabled' | 'all'
return Newscoop\Entity\Snippet\SnippetTemplate

save() public method

public save ( SnippetTemplate $snippetTemplate )
$snippetTemplate Newscoop\Entity\Snippet\SnippetTemplate