PHP 클래스 Newscoop\Entity\Repository\SnippetRepository

상속: extends Doctrine\ORM\EntityRepository
파일 보기 프로젝트 열기: sourcefabric/newscoop

공개 메소드들

메소드 설명
addSnippetToArticle ( Snippet $snippet, Article $article )
deleteSnippet ( $id, $force = false )
findSnippetsByName ( string $name, string $show = 'enabled', boolean $fuzzy = false ) : Doctrine\ORM\Query Get Snippet by Name
findSnippetsByNameForArticle ( $articleNr, $languageCode, string $name, string $show = 'enabled', boolean $fuzzy = false ) : Doctrine\ORM\Query Get Snippet by Name
getArticleSnippets ( $articleNr, $languageCode, string $show = 'enabled' ) : Doctrine\ORM\Query Get Snippets for Article
getSnippetById ( integer $id, string $show = 'enabled', $template = true ) : Snippet Get Snippet
getSnippets ( string $show = 'enabled' ) : Doctrine\ORM\Query Get all Snippets
removeSnippetFromArticle ( Snippet $snippet, Article $article )
save ( Snippet $snippet )

보호된 메소드들

메소드 설명
checkIfSnippetIsDisabled ( Doctrine\ORM\QueryBuilder $queryBuilder, mixed $result, string $show ) Check if a Snippet is disabled Internal use only
getArticleSnippetQueryBuilder ( $articleNr, string $language, string $show ) : Doctrine\ORM\Querybuilder Convenience QueryBuilder for Snippets attached to an Article
getSnippetArticles ( integer $id ) : Doctrine\Common\Collections\ArrayCollection Get all the Articles attached to a Snippet
getSnippetQueryBuilder ( string $show, $templateEnabled = true ) : Doctrine\ORM\Querybuilder Convenience QueryBuilder for Snippets

메소드 상세

addSnippetToArticle() 공개 메소드

public addSnippetToArticle ( Snippet $snippet, Article $article )
$snippet Newscoop\Entity\Snippet
$article Newscoop\Entity\Article

checkIfSnippetIsDisabled() 보호된 메소드

Check if a Snippet is disabled Internal use only
protected checkIfSnippetIsDisabled ( Doctrine\ORM\QueryBuilder $queryBuilder, mixed $result, string $show )
$queryBuilder Doctrine\ORM\QueryBuilder
$result mixed
$show string

deleteSnippet() 공개 메소드

public deleteSnippet ( $id, $force = false )

findSnippetsByName() 공개 메소드

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

findSnippetsByNameForArticle() 공개 메소드

Get Snippet by Name
public findSnippetsByNameForArticle ( $articleNr, $languageCode, string $name, string $show = 'enabled', boolean $fuzzy = false ) : Doctrine\ORM\Query
$name string Snippet Name
$show string Define which Snippets to return, 'enabled' | 'disabled' | 'all'
$fuzzy boolean Find fuzzy or not
리턴 Doctrine\ORM\Query Query

getArticleSnippetQueryBuilder() 보호된 메소드

This internal function is used by almost all Repository functions, it allows for more consistency. The rest of the doc also applies to the functions using it. Returns all the associated Snippets to an Article. If the SnippetTemplate is disabled, the Snippets depending on it won't be returned. By Default all Snippets that are Disabled themselves are not returned.
protected getArticleSnippetQueryBuilder ( $articleNr, string $language, string $show ) : Doctrine\ORM\Querybuilder
$language string Language code in format "en" for example.
$show string Define which Snippets to return, 'enabled' | 'disabled' | 'all'
리턴 Doctrine\ORM\Querybuilder $queryBuilder

getArticleSnippets() 공개 메소드

Returns all the associated Snippets to an Article. If the SnippetTemplate is disabled, the Snippets depending on it won't be returned. By Default all Snippets that are Disabled themselves are not returned.
public getArticleSnippets ( $articleNr, $languageCode, string $show = 'enabled' ) : Doctrine\ORM\Query
$show string Define which Snippets to return, 'enabled' | 'disabled' | 'all'
리턴 Doctrine\ORM\Query Query

getSnippetArticles() 보호된 메소드

Get all the Articles attached to a Snippet
protected getSnippetArticles ( integer $id ) : Doctrine\Common\Collections\ArrayCollection
$id integer SnippetID
리턴 Doctrine\Common\Collections\ArrayCollection

getSnippetById() 공개 메소드

Get Snippet
public getSnippetById ( integer $id, string $show = 'enabled', $template = true ) : Snippet
$id integer Snippet ID
$show string Define which Snippets to return, 'enabled' | 'disabled' | 'all'
리턴 Newscoop\Entity\Snippet

getSnippetQueryBuilder() 보호된 메소드

This internal function is used by almost all Repository functions, it allows for more consistency. The rest of the doc also applies to the functions using it. Returns all Snippets. If the SnippetTemplate is disabled, the Snippets depending on it won't be returned. By Default all Snippets that are Disabled themselves are not returned.
protected getSnippetQueryBuilder ( string $show, $templateEnabled = true ) : Doctrine\ORM\Querybuilder
$show string Define which Snippets to return, 'enabled' | 'disabled' | 'all'
리턴 Doctrine\ORM\Querybuilder $queryBuilder

getSnippets() 공개 메소드

Returns all Snippets. If the SnippetTemplate is disabled, the Snippets depending on it won't be returned. By Default all Snippets that are Disabled themselves are not returned.
public getSnippets ( string $show = 'enabled' ) : Doctrine\ORM\Query
$show string Define which Snippets to return, 'enabled' | 'disabled' | 'all'
리턴 Doctrine\ORM\Query Query

removeSnippetFromArticle() 공개 메소드

public removeSnippetFromArticle ( Snippet $snippet, Article $article )
$snippet Newscoop\Entity\Snippet
$article Newscoop\Entity\Article

save() 공개 메소드

public save ( Snippet $snippet )
$snippet Newscoop\Entity\Snippet