Class CRUDMySQLData
MySQL CRUDData implementation using a given Doctrine DBAL instance.
- CRUDlex\CRUDData
-
CRUDlex\CRUDMySQLData
protected
|
#
setValuesAndParameters(
Sets the values and parameters of the upcoming given query according to the entity. |
protected
|
|
protected
boolean
|
#
hasChildren( integer $id )
Checks whether the by id given entity still has children referencing it. |
protected
integer
|
|
protected
|
#
addFilter( Doctrine\DBAL\Query\QueryBuilder $queryBuilder, array $filter, array $filterOperators )
Adds sorting parameters to the query. |
protected
|
#
addPagination( Doctrine\DBAL\Query\QueryBuilder $queryBuilder, integer|null $skip, integer|null $amount )
Adds pagination parameters to the query. |
protected
|
#
addSort( Doctrine\DBAL\Query\QueryBuilder $queryBuilder, string|null $sortField, boolean|null $sortAscending )
Adds sorting parameters to the query. |
protected
|
#
fetchReferencesForField( array & $entities, string $field )
Adds the id and name of referenced entities to the given entities. The reference field is before the raw id of the referenced entity and after the fetch, it's an array with the keys id and name. |
protected
string|null
|
|
public
|
#
__construct(
Constructor. |
public
|
|
public
|
#
listEntries( array $filter = array(), array $filterOperators = array(), integer $skip = null, integer $amount = null, string $sortField = null, boolean $sortAscending = null )
Gets a list of entities fullfilling the given filter or all if no selection was given. |
public
boolean
|
|
public
|
#
update(
Updates an existing entry in the datasource having the same id. |
public
array
|
#
getReferences( string $table, string $nameField )
Gets ids and names of a table. Used for building up the dropdown box of reference type fields. |
public
integer
|
#
countBy( string $table, array $params, array $paramsOperators, boolean $excludeDeleted )
Retrieves the amount of entities in the datasource fulfilling the given parameters. |
public
|
#
fetchReferences( array & $entities = null )
Adds the id and name of referenced entities to the given entities. Each reference field is before the raw id of the referenced entity and after the fetch, it's an array with the keys id and name. |
createEmpty(),
createFiles(),
delete(),
deleteFile(),
deleteFiles(),
executeEvents(),
getDefinition(),
hydrate(),
performOnFiles(),
popEvent(),
pushEvent(),
renderFile(),
updateFiles()
|
DELETION_FAILED_EVENT,
DELETION_FAILED_STILL_REFERENCED,
DELETION_SUCCESS
|
protected
|
$db
Holds the Doctrine DBAL instance. |
|
protected
|
$useUUIDs
Flag whether to use UUIDs as primary key. |
$definition,
$events,
$fileProcessor
|