PHP Класс Newscoop\NewscoopBundle\Entity\Repository\TopicRepository

Наследование: extends Gedmo\Tree\Entity\Repository\NestedTreeRepository
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$onChildrenQuery

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

Метод Описание
childrenQuery ( $node = null, $direct = false, $sortByField = null, $direction = 'ASC', $include = false ) Will do reordering based on current translations.
childrenWithTranslations ( $node = null, $locale = null, $direct = false, $sortByField = null, $direction = 'ASC', $includeNode = false, $start = null, $limit = null )
countBy ( array $criteria = [] ) : integer Count topics by given criteria.
findAllParentChoices ( Topic $node = null ) : array Get all parent choices.
findOptions ( ) : array Find topic options.
getArticleTopics ( integer $articleNr, string $languageCode, string $order = 'asc' ) : Doctrine\ORM\Query Get Topics for Article.
getArticlesQueryByTopicIdAndLanguage ( integer $topicId, string $languageCode, boolean $defaultFallback = false ) : Doctrine\ORM\Query Get all articles for given topic by topic id and language code.
getOneByExtractedFullName ( $name, $languageCode )
getReadablePath ( Topic $topic, $locale = null ) : string Gets topic's path.
getRootNodes ( $locale = null, $childrenLevel = false, $sortByField = null, $direction = 'asc' ) {@inheritDoc}
getSingleTopicQuery ( integer $id, string $locale = null ) : Doctrine\ORM\Query Gets the single topic's query by id.
getTopicByIdOrName ( string | integer $topicIdOrName, string | integer $locale = null ) : Doctrine\ORM\Query Gets topic by given id or name.
getTopics ( $languageCode = null ) : Doctrine\ORM\Query Get all topics.
getTopicsQuery ( $direction = 'ASC' )
getTranslatableTopicLocale ( Topic $topic )
getTranslatableTopics ( $locale, $order = 'asc' ) Get topics query and set translatable hints.
searchTopics ( string $query, array $sort = [], $limit = null, $locale = null ) : Doctrine\ORM\Query Search topic by given query.
setTranslatableHint ( Doctrine\ORM\Query $query, string | null $locale = null ) : Doctrine\ORM\Query Add hints to the query.

Описание методов

childrenQuery() публичный метод

Will do reordering based on current translations.
public childrenQuery ( $node = null, $direct = false, $sortByField = null, $direction = 'ASC', $include = false )

childrenWithTranslations() публичный метод

См. также: getChildrenQueryBuilder
public childrenWithTranslations ( $node = null, $locale = null, $direct = false, $sortByField = null, $direction = 'ASC', $includeNode = false, $start = null, $limit = null )

countBy() публичный метод

Count topics by given criteria.
public countBy ( array $criteria = [] ) : integer
$criteria array
Результат integer

findAllParentChoices() публичный метод

Get all parent choices.
public findAllParentChoices ( Topic $node = null ) : array
$node Newscoop\NewscoopBundle\Entity\Topic Topic object
Результат array

findOptions() публичный метод

Find topic options.
public findOptions ( ) : array
Результат array

getArticleTopics() публичный метод

Returns all the associated Topics to an Article.
public getArticleTopics ( integer $articleNr, string $languageCode, string $order = 'asc' ) : Doctrine\ORM\Query
$articleNr integer Article number
$languageCode string Language code in format "en" for example.
$order string Order of the topics, default ascending
Результат Doctrine\ORM\Query Query

getArticlesQueryByTopicIdAndLanguage() публичный метод

Get all articles for given topic by topic id and language code.
public getArticlesQueryByTopicIdAndLanguage ( integer $topicId, string $languageCode, boolean $defaultFallback = false ) : Doctrine\ORM\Query
$topicId integer Topic id
$languageCode string Language code
$defaultFallback boolean Sets the language of the topic to the default one
Результат Doctrine\ORM\Query

getOneByExtractedFullName() публичный метод

public getOneByExtractedFullName ( $name, $languageCode )

getReadablePath() публичный метод

Gets topic's path.
public getReadablePath ( Topic $topic, $locale = null ) : string
$topic Newscoop\NewscoopBundle\Entity\Topic Topic
Результат string Path of the topic

getRootNodes() публичный метод

{@inheritDoc}
public getRootNodes ( $locale = null, $childrenLevel = false, $sortByField = null, $direction = 'asc' )

getSingleTopicQuery() публичный метод

Gets the single topic's query by id.
public getSingleTopicQuery ( integer $id, string $locale = null ) : Doctrine\ORM\Query
$id integer Topic id
$locale string Language code
Результат Doctrine\ORM\Query $query Query object

getTopicByIdOrName() публичный метод

Gets topic by given id or name.
public getTopicByIdOrName ( string | integer $topicIdOrName, string | integer $locale = null ) : Doctrine\ORM\Query
$topicIdOrName string | integer Topicid or name
$locale string | integer Current locale, language code or id
Результат Doctrine\ORM\Query

getTopics() публичный метод

Get all topics.
public getTopics ( $languageCode = null ) : Doctrine\ORM\Query
$languageCode Language code
Результат Doctrine\ORM\Query

getTopicsQuery() публичный метод

public getTopicsQuery ( $direction = 'ASC' )

getTranslatableTopicLocale() публичный метод

public getTranslatableTopicLocale ( Topic $topic )
$topic Newscoop\NewscoopBundle\Entity\Topic

getTranslatableTopics() публичный метод

Get topics query and set translatable hints.
public getTranslatableTopics ( $locale, $order = 'asc' )

searchTopics() публичный метод

Search topic by given query.
public searchTopics ( string $query, array $sort = [], $limit = null, $locale = null ) : Doctrine\ORM\Query
$query string
$sort array
Результат Doctrine\ORM\Query

setTranslatableHint() публичный метод

Add hints to the query.
public setTranslatableHint ( Doctrine\ORM\Query $query, string | null $locale = null ) : Doctrine\ORM\Query
$query Doctrine\ORM\Query Query
$locale string | null Lecale to which fallback
Результат Doctrine\ORM\Query

Описание свойств

$onChildrenQuery публичное свойство

public $onChildrenQuery