PHP Класс Newscoop\Entity\Repository\SnippetRepository

Наследование: extends Doctrine\ORM\EntityRepository
Показать файл Открыть проект

Открытые методы

Метод Описание
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