Свойство | 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. |
Méthode | 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 ( ) : |
Méthode | 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 | ||
Résultat | 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 |
Résultat | boolean |
public responseDelete ( $id, $deleteCallback ) : FOS\RestBundle\View\View | ||
$id | ||
$deleteCallback | ||
Résultat | FOS\RestBundle\View\View |
public responseFields ( ) : |
||
Résultat |
protected responseGetById ( $id, callback $findCallback ) : FOS\RestBundle\View\View | ||
$id | ||
$findCallback | callback | |
Résultat | 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 |
Résultat |
public responsePersistSettings ( ) : |
||
Résultat |
protected string $bundlePrefix | ||
Résultat | string |
protected static string $entityKey | ||
Résultat | string |
protected static string $entityName | ||
Résultat | string |
protected array $fieldTypes | ||
Résultat | array |
protected array $fieldsDefault | ||
Résultat | array |
protected array $fieldsEditable | ||
Résultat | array |
protected array $fieldsExcluded | ||
Résultat | array |
protected array $fieldsHidden | ||
Résultat | array |
protected array $fieldsRelations | ||
Résultat | array |
protected array $fieldsSortOrder | ||
Résultat | array |
protected array $fieldsTranslationKeys | ||
Résultat | array |
protected array $fieldsValidation | ||
Résultat | array |
protected array $sortable | ||
Résultat | array |
protected array $unsortable | ||
Résultat | array |