class ThemeRepository extends EntityRepository (View source)

[email protected]}

Constants

NODE_ALIAS

Alias for DQL and Query builder representing Node relation.

NODESSOURCES_ALIAS

Alias for DQL and Query builder representing NodesSources relation.

TRANSLATION_ALIAS

Alias for DQL and Query builder representing Translation relation.

TAG_ALIAS

Alias for DQL and Query builder representing Tag relation.

Properties

protected array $searchableTypes Doctrine column types that can be search with LIKEĀ feature. from EntityRepository

Methods

string
buildComparison(mixed $value, string $prefix, string $key, string $baseKey, QueryBuilder $qb)

Build a query comparison.

QueryBuilder
directComparison(array $criteria, QueryBuilder $qb, string $alias)

Direct bind parameters without preparation.

QueryBuilder
prepareComparisons(array $criteria, QueryBuilder $qb, string $alias)

No description

applyComparisons(array $criteria, Query $finalQuery)

No description

QueryBuilder
singleDirectComparison(string $key, mixed $value, QueryBuilder $qb, string $alias)

Direct bind one single parameter without preparation.

Func
directExprIn(QueryBuilder $qb, string $name, string $key, array $value)

No description

applyComparison(string $key, mixed $value, Query $finalQuery)

Bind classic parameters to your query.

integer
countBy(Criteria|mixed|array $criteria)

Count entities using a Criteria object or a simple filter array.

classicLikeComparison(string $pattern, QueryBuilder $qb, string $alias = "obj")

Create a LIKE comparison with entity texts colunms.

QueryBuilder
createSearchBy(string $pattern, QueryBuilder $qb, array $criteria = [], string $alias = "obj")

Create a Criteria object from a search pattern and additionnal fields.

array|Paginator
searchBy(string $pattern, array $criteria = [], array $orders = [], integer $limit = null, integer $offset = null)

No description

int
countSearchBy(string $pattern, array $criteria = [])

No description

buildTagFiltering(array $criteria, QueryBuilder $qb, string $nodeAlias = 'n')

No description

applyFilterByTag(array $criteria, Query $finalQuery)

Bind tag parameters to final query

boolean
hasJoinedNode(QueryBuilder $qb, string $alias)

Ensure that node table is joined only once.

boolean
hasJoinedNodesSources(QueryBuilder $qb, string $alias)

Ensure that nodes_sources table is joined only once.

findAvailableBackend()

Get available backend theme.

array|null
findAvailableFrontends()

Get available frontend themes.

Theme|null
findFirstAvailableFrontend()

Get available frontend theme.

Theme|null
findAvailableFrontendWithHost(string $hostname = "*")

Get available frontend theme for host.

Theme|null
findFirstAvailableNonStaticFrontend()

Get available non-static frontend theme.

Theme|null
findAvailableNonStaticFrontendWithHost(string $hostname = "*")

Get available non-static frontend theme for host.

Theme|null
findOneByClassName(string $className)

Cached query for find a theme with its class-name.

Details

protected string buildComparison(mixed $value, string $prefix, string $key, string $baseKey, QueryBuilder $qb)

Build a query comparison.

Parameters

mixed $value
string $prefix The prefix should always end with a dot
string $key
string $baseKey
QueryBuilder $qb

Return Value

string

protected QueryBuilder directComparison(array $criteria, QueryBuilder $qb, string $alias)

Direct bind parameters without preparation.

Parameters

array $criteria
QueryBuilder $qb
string $alias

Return Value

QueryBuilder

protected QueryBuilder prepareComparisons(array $criteria, QueryBuilder $qb, string $alias)

Parameters

array $criteria
QueryBuilder $qb
string $alias

Return Value

QueryBuilder

protected applyComparisons(array $criteria, Query $finalQuery)

Parameters

array $criteria
Query $finalQuery

protected QueryBuilder singleDirectComparison(string $key, mixed $value, QueryBuilder $qb, string $alias)

Direct bind one single parameter without preparation.

Parameters

string $key
mixed $value
QueryBuilder $qb
string $alias

Return Value

QueryBuilder

protected Func directExprIn(QueryBuilder $qb, string $name, string $key, array $value)

Parameters

QueryBuilder $qb &$qb
string $name
string $key
array $value

Return Value

Func

protected applyComparison(string $key, mixed $value, Query $finalQuery)

Bind classic parameters to your query.

Parameters

string $key
mixed $value
Query $finalQuery

integer countBy(Criteria|mixed|array $criteria)

Count entities using a Criteria object or a simple filter array.

Parameters

Criteria|mixed|array $criteria or array

Return Value

integer

protected classicLikeComparison(string $pattern, QueryBuilder $qb, string $alias = "obj")

Create a LIKE comparison with entity texts colunms.

Parameters

string $pattern
QueryBuilder $qb
string $alias

protected QueryBuilder createSearchBy(string $pattern, QueryBuilder $qb, array $criteria = [], string $alias = "obj")

Create a Criteria object from a search pattern and additionnal fields.

Parameters

string $pattern Search pattern
QueryBuilder $qb QueryBuilder to pass
array $criteria Additionnal criteria
string $alias SQL query table alias

Return Value

QueryBuilder

array|Paginator searchBy(string $pattern, array $criteria = [], array $orders = [], integer $limit = null, integer $offset = null)

Parameters

string $pattern Search pattern
array $criteria Additionnal criteria
array $orders
integer $limit
integer $offset

Return Value

array|Paginator

int countSearchBy(string $pattern, array $criteria = [])

Parameters

string $pattern Search pattern
array $criteria Additionnal criteria

Return Value

int

protected buildTagFiltering(array $criteria, QueryBuilder $qb, string $nodeAlias = 'n')

Parameters

array $criteria &$criteria
QueryBuilder $qb
string $nodeAlias

protected applyFilterByTag(array $criteria, Query $finalQuery)

Bind tag parameters to final query

Parameters

array $criteria
Query $finalQuery

protected boolean hasJoinedNode(QueryBuilder $qb, string $alias)

Ensure that node table is joined only once.

Parameters

QueryBuilder $qb
string $alias

Return Value

boolean

protected boolean hasJoinedNodesSources(QueryBuilder $qb, string $alias)

Ensure that nodes_sources table is joined only once.

Parameters

QueryBuilder $qb
string $alias

Return Value

boolean

Theme findAvailableBackend()

Get available backend theme.

This method use Result cache.

Return Value

Theme

array|null findAvailableFrontends()

Get available frontend themes.

This method uses Result cache.

We need to order themes using hostname to make hostnamed theme prioritary over wildcard themes.

Return Value

array|null

Theme|null findFirstAvailableFrontend()

Get available frontend theme.

This method use Result cache.

Return Value

Theme|null

Theme|null findAvailableFrontendWithHost(string $hostname = "*")

Get available frontend theme for host.

This method use Result cache.

Parameters

string $hostname

Return Value

Theme|null

Exceptions

NonUniqueResultException

Theme|null findFirstAvailableNonStaticFrontend()

Get available non-static frontend theme.

Static means that your theme is not suitable for responding from nodes urls but only static routes.

This method use Result cache.

Return Value

Theme|null

Theme|null findAvailableNonStaticFrontendWithHost(string $hostname = "*")

Get available non-static frontend theme for host.

Static means that your theme is not suitable for responding from nodes urls but only static routes.

This method use Result cache.

Parameters

string $hostname

Return Value

Theme|null

Exceptions

NonUniqueResultException

Theme|null findOneByClassName(string $className)

Cached query for find a theme with its class-name.

Parameters

string $className

Return Value

Theme|null