Property | Type | Description | |
---|---|---|---|
$bundlePrefix | string | standard bundle prefix. | |
$entityKey | string | The key of the entity which will be used in the embedded part of the REST Response. | |
$entityName | string | The type of the entity, which is handled by the concrete controller. | |
$fieldTypes | array | contains the matching between fields and their types. | |
$fieldsDefault | array | contains fields that cannot be hidden and are visible by default. | |
$fieldsEditable | array | contains fields that are editable. | |
$fieldsExcluded | array | contains all fields that should be excluded from api. | |
$fieldsHidden | array | contains all fields that should be hidden by default from api. | |
$fieldsMinWidth | contains the widths of the fields | ||
$fieldsRelations | array | contains all field relations. | |
$fieldsSortOrder | array | contains sort order of elements: array(order => fieldName). | |
$fieldsTranslationKeys | array | contains custom translation keys like array(fieldName => translationKey). | |
$fieldsValidation | array | contains arrays of validation key-value data. | |
$fieldsWidth | contains the widths of the fields | ||
$sortable | array | contains all attributes that are sortable if defined unsortable gets ignored. | |
$unsortable | array | contains all attributes that are not sortable. |
Method | Description | |
---|---|---|
getLocale ( |
Returns the language. | |
replaceOrAddUrlString ( string $url, string $key, string $value, boolean $add = true ) : mixed | string | function replaces a url parameter. | |
responseDelete ( $id, $deleteCallback ) : FOS\RestBundle\View\View | Deletes the entity with the given id using the deleteCallback and return a successful response, or an error message with a 4xx status code. | |
responseFields ( ) : |
Creates a response which contains all fields of the current entity. | |
responsePersistSettings ( ) : |
Method | Description | |
---|---|---|
addFieldAttributes ( $fields, $fieldsHidden = [] ) : array | creates the translation keys array and sets the default attribute, if set also adds the type property for. | |
createHalResponse ( array $entities, boolean $returnListLinks = false ) : array | creates HAL conform response-array out of an entity collection. | |
findMatch ( array $requestEntities, integer $id, array &$matchedEntry, string &$matchedKey ) | Tries to find a given id in a given set of entities. Returns the entity itself and its key with the $matchedEntry and $matchKey parameters. | |
getHalLinks ( array $entities, integer $pages = 1, boolean $returnListLinks = false ) : array | returns HAL-conform _links array. | |
processPut ( |
This method processes a put request (delete non-existing entities, update existing entities, add new entries), and let the single actions be modified by callbacks. | |
responseGetById ( $id, callback $findCallback ) : FOS\RestBundle\View\View | Returns the response with the entity with the given id, or a response with a status of 404, in case the entity is not found. The find method is injected by a callback. | |
responseList ( array $where = [], string $entityName = null, Function $entityFilter = null, array $joinConditions = [] ) : |
Lists all the entities or filters the entities by parameters Special function for lists route /contacts/list. |
protected addFieldAttributes ( $fields, $fieldsHidden = [] ) : array | ||
$fields | ||
$fieldsHidden | ||
return | array |
protected processPut ( |
||
$entities | ||
$requestEntities | ||
$deleteCallback | callback | |
$updateCallback | callback | |
$addCallback | callback | |
$entityIdCallback | callback | defines how to get the entity's id which will be compared with requestEntities' id |
return | boolean |
public responseDelete ( $id, $deleteCallback ) : FOS\RestBundle\View\View | ||
$id | ||
$deleteCallback | ||
return | FOS\RestBundle\View\View |
public responseFields ( ) : |
||
return |
protected responseGetById ( $id, callback $findCallback ) : FOS\RestBundle\View\View | ||
$id | ||
$findCallback | callback | |
return | FOS\RestBundle\View\View |
protected responseList ( array $where = [], string $entityName = null, Function $entityFilter = null, array $joinConditions = [] ) : |
||
$where | array | |
$entityName | string | |
$entityFilter | Function | function for filtering entities |
$joinConditions | array | to specify join conditions |
return |
public responsePersistSettings ( ) : |
||
return |
protected string $bundlePrefix | ||
return | string |
protected static string $entityKey | ||
return | string |
protected static string $entityName | ||
return | string |
protected array $fieldTypes | ||
return | array |
protected array $fieldsDefault | ||
return | array |
protected array $fieldsEditable | ||
return | array |
protected array $fieldsExcluded | ||
return | array |
protected array $fieldsHidden | ||
return | array |
protected array $fieldsRelations | ||
return | array |
protected array $fieldsSortOrder | ||
return | array |
protected array $fieldsTranslationKeys | ||
return | array |
protected array $fieldsValidation | ||
return | array |
protected array $sortable | ||
return | array |
protected array $unsortable | ||
return | array |