Grido@master
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Namespaces

  • Grido
    • Components
      • Actions
      • Columns
      • Filters
    • DataSources
    • PropertyAccessors
    • Translations

Classes

  • ArraySource
  • DibiFluent
  • Doctrine
  • Model
  • NetteDatabase

Interfaces

  • IDataSource

Class Doctrine

Doctrine data source.

Nette\Object
Extended by Grido\DataSources\Doctrine implements Grido\DataSources\IDataSource
Namespace: Grido\DataSources
Package: Grido\DataSources
Author: Martin Jantosovic martin.jantosovic@freya.sk
Author: Petr Bugyík
Located at DataSources/Doctrine.php

Methods summary

public
# __construct( Doctrine\ORM\QueryBuilder $qb, array $filterMapping = NULL, array $sortMapping = NULL )

If $sortMapping is not set and $filterMapping is set, $filterMapping will be used also as $sortMapping.

If $sortMapping is not set and $filterMapping is set, $filterMapping will be used also as $sortMapping.

Parameters

$qb
$filterMapping
Maps columns to the DQL columns
$sortMapping
Maps columns to the DQL columns
public Grido\DataSources\Doctrine
# setUseOutputWalkers( boolean $useOutputWalkers )

Parameters

$useOutputWalkers

Returns

Grido\DataSources\Doctrine
public Grido\DataSources\Doctrine
# setFetchJoinCollection( boolean $fetchJoinCollection )

Parameters

$fetchJoinCollection

Returns

Grido\DataSources\Doctrine
public Doctrine\ORM\Query
# getQuery( )

Returns

Doctrine\ORM\Query
public Doctrine\ORM\QueryBuilder
# getQb( )

Returns

Doctrine\ORM\QueryBuilder
public array|null
# getFilterMapping( )

Returns

array|null
public array|null
# getSortMapping( )

Returns

array|null
protected
# makeWhere( Grido\Components\Filters\Condition $condition, Doctrine\ORM\QueryBuilder $qb = NULL )

Parameters

$condition
$qb
protected string
# getRand( )

Returns

string
public integer
# getCount( )

Returns

integer

Implementation of

Grido\DataSources\IDataSource::getCount()
public array
# getData( )

It is possible to use query builder with additional columns. In this case, only item at index [0] is returned, because it should be an entity object.

It is possible to use query builder with additional columns. In this case, only item at index [0] is returned, because it should be an entity object.

Returns

array

Implementation of

Grido\DataSources\IDataSource::getData()
public
# filter( array $conditions )

Sets filter.

Sets filter.

Parameters

$conditions

Implementation of

Grido\DataSources\IDataSource::filter()
public
# limit( integer $offset, integer $limit )

Sets offset and limit.

Sets offset and limit.

Parameters

$offset
$limit

Implementation of

Grido\DataSources\IDataSource::limit()
public
# sort( array $sorting )

Sets sorting.

Sets sorting.

Parameters

$sorting

Implementation of

Grido\DataSources\IDataSource::sort()
public array
# suggest( mixed $column, array $conditions, integer $limit )

Parameters

$column
$conditions
$limit

Returns

array

Throws

InvalidArgumentException

Implementation of

Grido\DataSources\IDataSource::suggest()

Magic methods summary

Properties summary

protected Doctrine\ORM\QueryBuilder $qb
#
protected array $filterMapping

Map column to the query builder

Map column to the query builder

#
protected array $sortMapping

Map column to the query builder

Map column to the query builder

#
protected boolean $useOutputWalkers

use OutputWalker in Doctrine Paginator

use OutputWalker in Doctrine Paginator

#
protected boolean $fetchJoinCollection

fetch join collection in Doctrine Paginator

fetch join collection in Doctrine Paginator

# TRUE
protected array $rand
#

Magic properties

public read-only Doctrine\ORM\QueryBuilder $qb
public read-only array $filterMapping
public read-only array $sortMapping
public read-only integer $count
public read-only array $data
Grido@master API documentation generated by ApiGen