PHP Class Jarves\Admin\ObjectCrud

Inheritance: implements Jarves\Admin\ObjectCrudInterface
Afficher le fichier Open project: jarves/jarves Class Usage Examples

Protected Properties

Свойство Type Description
$_fields Jarves\Configuration\Field[] Flatten list of fields.
$acl Jarves\ACL
$add boolean Defines whether the add button should be displayed
$addEntrypoint string Default is /. Relative or absolute paths are allowed. Empty means current entrypoint.
$addIcon Defines the icon for the add button. Relative to media/ or #className for vector images
$addMultiple
$addMultipleFieldContainerWidth
$addMultipleFields
$addMultipleFixedFields
$allowCustomFieldSelection boolean (?fields=...)
$asNested boolean Is automatically set when object property is defined.
$columns array This is used by the listing crud window (and GET of the REST api) Only one level, no children, no tabs. Use the crud editor, to get the list of possible types.
$conditionOperator Jarves\ConditionOperator
$customOrderBy string Order field
$defaultLimit Defines how many items should be displayed per page.
$domain integer The current domain id to filter if domainDepended is enabled.
$domainDepended boolean Note: Your table need a field 'domain_id' int. The windowList class filter by this.
$edit boolean Defines whether the edit button should be displayed
$editEntrypoint string Default is /. Relative or absolute paths are allowed. Empty means current entrypoint.
$editIcon Defines the icon for the edit button. Relative to media/ or #className for vector images
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$extraSelection string | array Only field names allowed that are available by the underlying object. Comma separated or as array.
$fields array Can contains several fields nested, via 'children', also type 'tab' are allowed. Every jarves.field is allowed.
$filter array Contains the fields for the search.
$filterFields array
$itemLayout string
$itemsPerPage integer
$jarves Jarves\Jarves
$language string The current language to filter if multiLanguage is enabled.
$multiLanguage boolean Note: Your table need a field 'lang' varchar(2). The windowList class filter by this. If the object is nested=true and have a root object
$nestedAddWithPositionSelection
$nestedMoveable
$nestedRootAdd
$nestedRootAddEntrypoint
$nestedRootAddIcon
$nestedRootAddLabel
$nestedRootEdit
$nestedRootEditEntrypoint
$nestedRootRemove
$nestedRootRemoveEntrypoint
$newLabel
$object Defines the object which should be used.
$objectBased boolean Whether this CRUD view is based on a object with an id.
$objectDefinition Jarves\Configuration\Object Copy of the object definition, by is being set in the initialisation. Only set when object property is defined.
$objects Jarves\Objects
$order array array( array('field' => 'group_id', 'direction' => 'asc'), array('field' => 'title', 'direction' => 'asc') ); or array( 'group_id' => 'asc', 'title' => 'desc' )
$orderBy string Order field
$orderByDirection string Order direction
$permissionCheck boolean Deactivate this means this object does not listen to any ACL.
$primary array Example: $primary = array('id'); Example: $primary = array('id', 'name'); Use this only if you know, what you're doing, normally this comes from the object settings.
$primaryKey array If the class created a item through addItem(), it contains the primary key of the newly created item. array( 'id' => 1234 ) array( 'id' => 1234, 'subId' => 5678 )
$remove boolean Defines whether the remove/delete button should be displayed Also on each row the Delete-Button and the checkboxes.
$removeEntrypoint string
$removeIcon Defines the icon for the remove/delete button. Relative to media/ or #className for vector images
$removeIconItem Defines the icon for the remove/delete button. Relative to media/ or #className for vector images
$requestStack Symfony\Component\HttpFoundation\RequestStack
$startCombine
$table Use this only if you know, what you're doing, normally this comes from the object definition from the object property.
$translator Jarves\Translation\Translator
$usePatch boolean 'PUT' requires that you send all field, and 'PATCH' only the fields that need to be updated.
$utils Jarves\Utils
$withNewsFeed boolean
$workspace boolean Needs a column workspace_id in the table or active workspace at object.

Méthodes publiques

Méthode Description
__construct ( Translator $translator, Objects $objects, Jarves $jarves, Symfony\Component\HttpFoundation\RequestStack $requestStack, ConditionOperator $conditionOperator, ACL $acl, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, Utils $utils ) ObjectCrud constructor.
add ( Request | array $requestOrData, array | null $pk = null, string | null $position = null, string | null $targetObjectKey = null ) : mixed Adds a new item.
addMultiple ( Request $request ) : array | mixed Adds multiple entries.
buildFilter ( array $filter ) : array | null
collectData ( Request | array $requestData ) : array
getAdd ( ) : boolean
getAddEntrypoint ( ) : string
getAddIcon ( ) : string
getAddMultiple ( )
getAddMultipleFieldContainerWidth ( )
getAddMultipleFields ( )
getAddMultipleFixedFields ( )
getAllowCustomFieldSelection ( ) : boolean
getAsNested ( ) : boolean
getBranchChildrenCount ( mixed $pk = null, mixed $scope = null, array $filter = null ) : array Returns items count per branch.
getBranchItems ( mixed $pk = null, array $filter = null, mixed $fields = null, mixed $scope = null, integer $depth = 1, integer $limit = null, integer $offset = null, boolean $withAcl = false ) : mixed Returns items per branch.
getColumns ( ) : array
getCondition ( ) : Condition Here you can define additional conditions for all operations (edit/listing).
getCount ( Condition | array $filter, string $query = '' ) : integer
getCustomEditCondition ( ) : Condition Here you can define additional conditions for edit operations.
getCustomListingCondition ( ) : Condition Here you can define additional conditions for listing operations.
getCustomOrderBy ( ) : string
getDefaultFieldList ( ) : array Get a list of field key for $this->_fields
getDefaultLimit ( ) : integer
getDomain ( ) : integer The current domain id to filter if domainDepended is enabled.
getDomainDepended ( ) : boolean
getEdit ( ) : boolean
getEditEntrypoint ( ) : string
getEditIcon ( ) : string
getExtraSelection ( ) : array
getFields ( ) : Field[]
getFilter ( ) : array
getFilterFields ( )
getInfo ( )
getInitializedFields ( ) : Field[]
getItem ( array $pk, array $fields = null, boolean $withAcl = false ) : array $pk is an array with the primary key values.
getItemLayout ( )
getItems ( array $filter = null, integer $limit = null, integer $offset = null, string $query = '', string $fields = null, array $orderBy = [], boolean $withAcl = false, array $primaryKeys = [] ) : array array( 'items' => $items, 'count' => $maxItems, 'pages' => $maxPages );
getItemsPerPage ( ) : integer
getLanguage ( ) : string The current language to filter if multiLanguage is enabled.
getMultiLanguage ( ) : boolean
getNestedAddWithPositionSelection ( )
getNestedMoveable ( )
getNestedRootAdd ( )
getNestedRootAddEntrypoint ( )
getNestedRootAddIcon ( )
getNestedRootAddLabel ( )
getNestedRootEdit ( )
getNestedRootEditEntrypoint ( )
getNestedRootRemove ( )
getNestedRootRemoveEntrypoint ( )
getNewLabel ( )
getObject ( ) : string
getObjectBased ( ) : boolean
getObjectDefinition ( ) : Object
getOrder ( ) : array
getOrderBy ( ) : string
getOrderByDirection ( ) : string
getParent ( $pk, $fields = null )
getParents ( $pk )
getPermissionCheck ( ) : boolean
getPosition ( $pk, $order )
getPrimary ( ) : array
getPrimaryKey ( ) : array The primary key of the current object.
getRemove ( ) : boolean
getRemoveEntrypoint ( )
getRemoveIcon ( ) : string
getRemoveIconItem ( ) : string
getRoot ( $scope = null )
getRoots ( $condition = null, $lang = null, $domain )
getStartCombine ( ) : boolean
getTable ( ) : string
getTreeFields ( string $fields = null ) : array
getUsePatch ( ) : boolean
getWithNewsFeed ( ) : boolean
getWorkspace ( ) : boolean
initialize ( boolean $withoutObjectCheck = false )
isObjectBased ( ) : boolean
mapData ( array $data, array $filterFields = null, mixed $defaultData = null ) : array Maps all $data to its field values (Admin\Type*::mapValues) Iterates only through all defined fields in $fields.
moveItem ( $pk, $targetPk, $position = 'first', $targetObjectKey = '' )
patch ( array $pk, Request | array $requestOrData ) : boolean Patches a object entry. This means, only defined fields will be saved. Fields which are not defined will not be overwritten.
prepareFieldAcl ( &$item )
prepareFieldDefinition ( array &$fields ) prepares $fields. Replace array items which are only a key (with no array definition) with the array definition of the proper field from the object fields.
prepareFieldItem ( Field[] | Field $fields ) Prepare fields. Loading tableItems by select and file fields.
prepareRow ( array &$item ) : array Each item goes through this function in getItems(). Defines whether a item is editable or deleteable.
remove ( $pk ) : boolean
setAdd ( boolean $add )
setAddEntrypoint ( string $addEntrypoint )
setAddIcon ( string $addIcon )
setAddMultiple ( $addMultiple )
setAddMultipleFieldContainerWidth ( $addMultipleFieldContainerWidth )
setAddMultipleFields ( $addMultipleFields )
setAddMultipleFixedFields ( $addMultipleFixedFields )
setAllowCustomFieldSelection ( boolean $allowExtraFieldSelection )
setAsNested ( boolean $asNested )
setColumns ( array $columns )
setCustomOrderBy ( string $customOrderBy )
setDefaultLimit ( integer $defaultLimit )
setDomain ( integer $domain )
setDomainDepended ( boolean $domainDepended )
setEdit ( boolean $edit )
setEditEntrypoint ( string $editEntrypoint )
setEditIcon ( $editIcon )
setExtraSelection ( array | string $selection )
setFields ( array $fields )
setFilter ( array $filter )
setFilterFields ( $filterFields )
setItemLayout ( $itemLayout )
setItemsPerPage ( integer $itemsPerPage )
setLanguage ( string $language )
setMultiLanguage ( boolean $multiLanguage )
setNestedAddWithPositionSelection ( $nestedAddWithPositionSelection )
setNestedMoveable ( $nestedMoveable )
setNestedRootAdd ( $nestedRootAdd )
setNestedRootAddEntrypoint ( $nestedRootAddEntrypoint )
setNestedRootAddIcon ( $nestedRootAddIcon )
setNestedRootAddLabel ( $nestedRootAddLabel )
setNestedRootEdit ( $nestedRootEdit )
setNestedRootEditEntrypoint ( $nestedRootEditEntrypoint )
setNestedRootRemove ( $nestedRootRemove )
setNestedRootRemoveEntrypoint ( $nestedRootRemoveEntrypoint )
setNewLabel ( $newLabel )
setObject ( string $object )
setObjectBased ( boolean $objectBased )
setObjectDefinition ( array $objectDefinition )
setOrder ( array $order )
setOrderBy ( string $orderBy )
setOrderByDirection ( string $orderByDirection )
setPermissionCheck ( boolean $permissionCheck )
setPrimary ( array $primary )
setRemove ( boolean $remove )
setRemoveEntrypoint ( $removeEntrypoint )
setRemoveIcon ( string $removeIcon )
setRemoveIconItem ( string $removeIconItem )
setStartCombine ( boolean $startCombine )
setTable ( string $table )
setUsePatch ( boolean $usePatch )
setWithNewsFeed ( boolean $withNewsFeed )
setWorkspace ( boolean $workspace )
toIdIndex ( Field[] $fieldArray )
translate ( &$field )
translateFields ( array | Field $fields ) Translate the label/title item of $fields.
update ( array $pk, Request | array $requestOrData ) : boolean Updates a object entry. This means, all fields which are not defined will be saved as NULL.

Méthodes protégées

Méthode Description
applyDefaultSelection ( array $fields ) : array Adds labelField, extraSelection and filter by blacklistSelection
convertToFieldObjects ( array &$fields ) Converst array field definition to real Field objects.
ensureLanguageField ( ) Makes sure $this->_fields has a language field when multiLanguage=true
getBranchItemsSelection ( string | array $fields = null ) : array Returns the field list for branchItems selection.
getItemSelection ( string | array $fields = null ) : array Returns the field list for single item selection.
getItemsSelection ( string | array $fields = null ) : array Returns the field list for items selection.
getNestedSelection ( $fields )
getQueryCondition ( $query, $fields )

Method Details

__construct() public méthode

ObjectCrud constructor.
public __construct ( Translator $translator, Objects $objects, Jarves $jarves, Symfony\Component\HttpFoundation\RequestStack $requestStack, ConditionOperator $conditionOperator, ACL $acl, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, Utils $utils )
$translator Jarves\Translation\Translator
$objects Jarves\Objects
$jarves Jarves\Jarves
$requestStack Symfony\Component\HttpFoundation\RequestStack
$conditionOperator Jarves\ConditionOperator
$acl Jarves\ACL
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$utils Jarves\Utils

add() public méthode

Data is passed as POST.
public add ( Request | array $requestOrData, array | null $pk = null, string | null $position = null, string | null $targetObjectKey = null ) : mixed
$requestOrData Symfony\Component\HttpFoundation\Request | array
$pk array | null
$position string | null If nested set. `first` (child), `last` (child), `prev` (sibling), `next` (sibling)
$targetObjectKey string | null
Résultat mixed false if some went wrong or a array with the new primary keys.

addMultiple() public méthode

We need as POST following data: { _items: [ {field1: 'foo', field2: 'bar'}, {field1: 'foo2', field2: 'bar2'}, .... ], same value across all items, all without underscore fixedField1: 'asd', field3: 'fgh', _position: 'first', //take a look at $this->objects->add() at parameter $pPosition _pk: { id: 123132 }, can differ between the actual object and the target (if we have a different object as root, then only position first and 'last` are available.) _targetObjectKey: 'jarves/node' }
public addMultiple ( Request $request ) : array | mixed
$request Symfony\Component\HttpFoundation\Request
Résultat array | mixed

applyDefaultSelection() protected méthode

Adds labelField, extraSelection and filter by blacklistSelection
protected applyDefaultSelection ( array $fields ) : array
$fields array
Résultat array

buildFilter() public static méthode

public static buildFilter ( array $filter ) : array | null
$filter array
Résultat array | null

collectData() public méthode

public collectData ( Request | array $requestData ) : array
$requestData Symfony\Component\HttpFoundation\Request | array *@return array
Résultat array

convertToFieldObjects() protected méthode

Converst array field definition to real Field objects.
protected convertToFieldObjects ( array &$fields )
$fields array

ensureLanguageField() protected méthode

Makes sure $this->_fields has a language field when multiLanguage=true
protected ensureLanguageField ( )

getAdd() public méthode

public getAdd ( ) : boolean
Résultat boolean

getAddEntrypoint() public méthode

public getAddEntrypoint ( ) : string
Résultat string

getAddIcon() public méthode

public getAddIcon ( ) : string
Résultat string

getAddMultiple() public méthode

public getAddMultiple ( )

getAddMultipleFieldContainerWidth() public méthode

getAddMultipleFields() public méthode

getAddMultipleFixedFields() public méthode

getAllowCustomFieldSelection() public méthode

getAsNested() public méthode

public getAsNested ( ) : boolean
Résultat boolean

getBranchChildrenCount() public méthode

Returns items count per branch.
public getBranchChildrenCount ( mixed $pk = null, mixed $scope = null, array $filter = null ) : array
$pk mixed
$scope mixed
$filter array
Résultat array

getBranchItems() public méthode

Returns items per branch.
public getBranchItems ( mixed $pk = null, array $filter = null, mixed $fields = null, mixed $scope = null, integer $depth = 1, integer $limit = null, integer $offset = null, boolean $withAcl = false ) : mixed
$pk mixed
$filter array
$fields mixed
$scope mixed
$depth integer
$limit integer
$offset integer
$withAcl boolean
Résultat mixed

getBranchItemsSelection() protected méthode

Returns the field list for branchItems selection.
protected getBranchItemsSelection ( string | array $fields = null ) : array
$fields string | array
Résultat array

getColumns() public méthode

public getColumns ( ) : array
Résultat array

getCondition() public méthode

Here you can define additional conditions for all operations (edit/listing).
public getCondition ( ) : Condition
Résultat Jarves\Configuration\Condition definition

getCount() public méthode

public getCount ( Condition | array $filter, string $query = '' ) : integer
$filter Jarves\Configuration\Condition | array
$query string
Résultat integer

getCustomEditCondition() public méthode

Here you can define additional conditions for edit operations.
public getCustomEditCondition ( ) : Condition
Résultat Jarves\Configuration\Condition definition

getCustomListingCondition() public méthode

Here you can define additional conditions for listing operations.
public getCustomListingCondition ( ) : Condition
Résultat Jarves\Configuration\Condition definition

getCustomOrderBy() public méthode

public getCustomOrderBy ( ) : string
Résultat string

getDefaultFieldList() public méthode

Get a list of field key for $this->_fields
public getDefaultFieldList ( ) : array
Résultat array

getDefaultLimit() public méthode

public getDefaultLimit ( ) : integer
Résultat integer

getDomain() public méthode

The current domain id to filter if domainDepended is enabled.
public getDomain ( ) : integer
Résultat integer

getDomainDepended() public méthode

public getDomainDepended ( ) : boolean
Résultat boolean

getEdit() public méthode

public getEdit ( ) : boolean
Résultat boolean

getEditEntrypoint() public méthode

public getEditEntrypoint ( ) : string
Résultat string

getEditIcon() public méthode

public getEditIcon ( ) : string
Résultat string

getExtraSelection() public méthode

public getExtraSelection ( ) : array
Résultat array

getFields() public méthode

public getFields ( ) : Field[]
Résultat Jarves\Configuration\Field[]

getFilter() public méthode

public getFilter ( ) : array
Résultat array

getFilterFields() public méthode

public getFilterFields ( )

getInfo() public méthode

public getInfo ( )

getInitializedFields() public méthode

public getInitializedFields ( ) : Field[]
Résultat Jarves\Configuration\Field[]

getItem() public méthode

If one primary key: array( 'id' => 1234 ) If multiple primary keys: array( 'id' => 1234 'secondId' => 5678 )
public getItem ( array $pk, array $fields = null, boolean $withAcl = false ) : array
$pk array
$fields array
$withAcl boolean
Résultat array

getItemLayout() public méthode

public getItemLayout ( )

getItemSelection() protected méthode

Returns the field list for single item selection.
protected getItemSelection ( string | array $fields = null ) : array
$fields string | array
Résultat array

getItems() public méthode

array( 'items' => $items, 'count' => $maxItems, 'pages' => $maxPages );
public getItems ( array $filter = null, integer $limit = null, integer $offset = null, string $query = '', string $fields = null, array $orderBy = [], boolean $withAcl = false, array $primaryKeys = [] ) : array
$filter array
$limit integer
$offset integer
$query string
$fields string
$orderBy array
$withAcl boolean
$primaryKeys array
Résultat array

getItemsPerPage() public méthode

public getItemsPerPage ( ) : integer
Résultat integer

getItemsSelection() protected méthode

Returns the field list for items selection.
protected getItemsSelection ( string | array $fields = null ) : array
$fields string | array
Résultat array

getLanguage() public méthode

The current language to filter if multiLanguage is enabled.
public getLanguage ( ) : string
Résultat string

getMultiLanguage() public méthode

public getMultiLanguage ( ) : boolean
Résultat boolean

getNestedAddWithPositionSelection() public méthode

getNestedMoveable() public méthode

public getNestedMoveable ( )

getNestedRootAdd() public méthode

public getNestedRootAdd ( )

getNestedRootAddEntrypoint() public méthode

getNestedRootAddIcon() public méthode

getNestedRootAddLabel() public méthode

getNestedRootEdit() public méthode

public getNestedRootEdit ( )

getNestedRootEditEntrypoint() public méthode

getNestedRootRemove() public méthode

public getNestedRootRemove ( )

getNestedRootRemoveEntrypoint() public méthode

getNestedSelection() protected méthode

protected getNestedSelection ( $fields )

getNewLabel() public méthode

public getNewLabel ( )

getObject() public méthode

public getObject ( ) : string
Résultat string

getObjectBased() public méthode

public getObjectBased ( ) : boolean
Résultat boolean

getObjectDefinition() public méthode

public getObjectDefinition ( ) : Object
Résultat Jarves\Configuration\Object

getOrder() public méthode

public getOrder ( ) : array
Résultat array

getOrderBy() public méthode

public getOrderBy ( ) : string
Résultat string

getOrderByDirection() public méthode

public getOrderByDirection ( ) : string
Résultat string

getParent() public méthode

public getParent ( $pk, $fields = null )

getParents() public méthode

public getParents ( $pk )

getPermissionCheck() public méthode

public getPermissionCheck ( ) : boolean
Résultat boolean

getPosition() public méthode

public getPosition ( $pk, $order )

getPrimary() public méthode

public getPrimary ( ) : array
Résultat array

getPrimaryKey() public méthode

If the class created a item through addItem(), it contains the primary key of the newly created item. array( 'id' => 1234 ) array( 'id' => 1234, 'subId' => 5678 )
public getPrimaryKey ( ) : array
Résultat array

getQueryCondition() protected méthode

protected getQueryCondition ( $query, $fields )

getRemove() public méthode

public getRemove ( ) : boolean
Résultat boolean

getRemoveEntrypoint() public méthode

public getRemoveEntrypoint ( )

getRemoveIcon() public méthode

public getRemoveIcon ( ) : string
Résultat string

getRemoveIconItem() public méthode

public getRemoveIconItem ( ) : string
Résultat string

getRoot() public méthode

public getRoot ( $scope = null )

getRoots() public méthode

public getRoots ( $condition = null, $lang = null, $domain )

getStartCombine() public méthode

public getStartCombine ( ) : boolean
Résultat boolean

getTable() public méthode

public getTable ( ) : string
Résultat string

getTreeFields() public méthode

public getTreeFields ( string $fields = null ) : array
$fields string
Résultat array

getUsePatch() public méthode

public getUsePatch ( ) : boolean
Résultat boolean

getWithNewsFeed() public méthode

public getWithNewsFeed ( ) : boolean
Résultat boolean

getWorkspace() public méthode

public getWorkspace ( ) : boolean
Résultat boolean

initialize() public méthode

public initialize ( boolean $withoutObjectCheck = false )
$withoutObjectCheck boolean

isObjectBased() public méthode

public isObjectBased ( ) : boolean
Résultat boolean

mapData() public méthode

Maps all $data to its field values (Admin\Type*::mapValues) Iterates only through all defined fields in $fields.
public mapData ( array $data, array $filterFields = null, mixed $defaultData = null ) : array
$data array
$filterFields array Field name list to map, empty for all
$defaultData mixed Default data. Is used if a field is not defined through _POST or _GET
Résultat array

moveItem() public méthode

public moveItem ( $pk, $targetPk, $position = 'first', $targetObjectKey = '' )

patch() public méthode

Patches a object entry. This means, only defined fields will be saved. Fields which are not defined will not be overwritten.
public patch ( array $pk, Request | array $requestOrData ) : boolean
$pk array
$requestOrData Symfony\Component\HttpFoundation\Request | array
Résultat boolean

prepareFieldAcl() public méthode

public prepareFieldAcl ( &$item )

prepareFieldDefinition() public méthode

prepares $fields. Replace array items which are only a key (with no array definition) with the array definition of the proper field from the object fields.
public prepareFieldDefinition ( array &$fields )
$fields array

prepareFieldItem() public méthode

Adds lang field when necessary.
public prepareFieldItem ( Field[] | Field $fields )
$fields Jarves\Configuration\Field[] | Jarves\Configuration\Field

prepareRow() public méthode

You can attach here extra action icons, too. Result should be: $item['_editable'] = true|false $item['_deleteable'] = true|false $item['_actions'] = array( array('/* action * /') //todo ) )
public prepareRow ( array &$item ) : array
$item array
Résultat array

remove() public méthode

public remove ( $pk ) : boolean
$pk
Résultat boolean

setAdd() public méthode

public setAdd ( boolean $add )
$add boolean

setAddEntrypoint() public méthode

public setAddEntrypoint ( string $addEntrypoint )
$addEntrypoint string

setAddIcon() public méthode

public setAddIcon ( string $addIcon )
$addIcon string

setAddMultiple() public méthode

public setAddMultiple ( $addMultiple )

setAddMultipleFieldContainerWidth() public méthode

public setAddMultipleFieldContainerWidth ( $addMultipleFieldContainerWidth )

setAddMultipleFields() public méthode

public setAddMultipleFields ( $addMultipleFields )

setAddMultipleFixedFields() public méthode

public setAddMultipleFixedFields ( $addMultipleFixedFields )

setAllowCustomFieldSelection() public méthode

public setAllowCustomFieldSelection ( boolean $allowExtraFieldSelection )
$allowExtraFieldSelection boolean

setAsNested() public méthode

public setAsNested ( boolean $asNested )
$asNested boolean

setColumns() public méthode

public setColumns ( array $columns )
$columns array

setCustomOrderBy() public méthode

public setCustomOrderBy ( string $customOrderBy )
$customOrderBy string

setDefaultLimit() public méthode

public setDefaultLimit ( integer $defaultLimit )
$defaultLimit integer

setDomain() public méthode

public setDomain ( integer $domain )
$domain integer

setDomainDepended() public méthode

public setDomainDepended ( boolean $domainDepended )
$domainDepended boolean

setEdit() public méthode

public setEdit ( boolean $edit )
$edit boolean

setEditEntrypoint() public méthode

public setEditEntrypoint ( string $editEntrypoint )
$editEntrypoint string

setEditIcon() public méthode

public setEditIcon ( $editIcon )

setExtraSelection() public méthode

public setExtraSelection ( array | string $selection )
$selection array | string

setFields() public méthode

public setFields ( array $fields )
$fields array

setFilter() public méthode

public setFilter ( array $filter )
$filter array

setFilterFields() public méthode

public setFilterFields ( $filterFields )

setItemLayout() public méthode

public setItemLayout ( $itemLayout )

setItemsPerPage() public méthode

public setItemsPerPage ( integer $itemsPerPage )
$itemsPerPage integer

setLanguage() public méthode

public setLanguage ( string $language )
$language string

setMultiLanguage() public méthode

public setMultiLanguage ( boolean $multiLanguage )
$multiLanguage boolean

setNestedAddWithPositionSelection() public méthode

public setNestedAddWithPositionSelection ( $nestedAddWithPositionSelection )

setNestedMoveable() public méthode

public setNestedMoveable ( $nestedMoveable )

setNestedRootAdd() public méthode

public setNestedRootAdd ( $nestedRootAdd )

setNestedRootAddEntrypoint() public méthode

public setNestedRootAddEntrypoint ( $nestedRootAddEntrypoint )

setNestedRootAddIcon() public méthode

public setNestedRootAddIcon ( $nestedRootAddIcon )

setNestedRootAddLabel() public méthode

public setNestedRootAddLabel ( $nestedRootAddLabel )

setNestedRootEdit() public méthode

public setNestedRootEdit ( $nestedRootEdit )

setNestedRootEditEntrypoint() public méthode

public setNestedRootEditEntrypoint ( $nestedRootEditEntrypoint )

setNestedRootRemove() public méthode

public setNestedRootRemove ( $nestedRootRemove )

setNestedRootRemoveEntrypoint() public méthode

public setNestedRootRemoveEntrypoint ( $nestedRootRemoveEntrypoint )

setNewLabel() public méthode

public setNewLabel ( $newLabel )

setObject() public méthode

public setObject ( string $object )
$object string

setObjectBased() public méthode

public setObjectBased ( boolean $objectBased )
$objectBased boolean

setObjectDefinition() public méthode

public setObjectDefinition ( array $objectDefinition )
$objectDefinition array

setOrder() public méthode

public setOrder ( array $order )
$order array

setOrderBy() public méthode

public setOrderBy ( string $orderBy )
$orderBy string

setOrderByDirection() public méthode

public setOrderByDirection ( string $orderByDirection )
$orderByDirection string

setPermissionCheck() public méthode

public setPermissionCheck ( boolean $permissionCheck )
$permissionCheck boolean

setPrimary() public méthode

public setPrimary ( array $primary )
$primary array

setRemove() public méthode

public setRemove ( boolean $remove )
$remove boolean

setRemoveEntrypoint() public méthode

public setRemoveEntrypoint ( $removeEntrypoint )

setRemoveIcon() public méthode

public setRemoveIcon ( string $removeIcon )
$removeIcon string

setRemoveIconItem() public méthode

public setRemoveIconItem ( string $removeIconItem )
$removeIconItem string

setStartCombine() public méthode

public setStartCombine ( boolean $startCombine )
$startCombine boolean

setTable() public méthode

public setTable ( string $table )
$table string

setUsePatch() public méthode

public setUsePatch ( boolean $usePatch )
$usePatch boolean

setWithNewsFeed() public méthode

public setWithNewsFeed ( boolean $withNewsFeed )
$withNewsFeed boolean

setWorkspace() public méthode

public setWorkspace ( boolean $workspace )
$workspace boolean

toIdIndex() public méthode

public toIdIndex ( Field[] $fieldArray )
$fieldArray Jarves\Configuration\Field[]

translate() public méthode

public translate ( &$field )
$field

translateFields() public méthode

Translate the label/title item of $fields.
public translateFields ( array | Field $fields )
$fields array | Jarves\Configuration\Field

update() public méthode

Updates a object entry. This means, all fields which are not defined will be saved as NULL.
public update ( array $pk, Request | array $requestOrData ) : boolean
$pk array
$requestOrData Symfony\Component\HttpFoundation\Request | array
Résultat boolean

Property Details

$_fields protected_oe property

Flatten list of fields.
protected Field[],Jarves\Configuration $_fields
Résultat Jarves\Configuration\Field[]

$acl protected_oe property

protected ACL,Jarves $acl
Résultat Jarves\ACL

$add protected_oe property

Defines whether the add button should be displayed
protected bool $add
Résultat boolean

$addEntrypoint protected_oe property

Default is /. Relative or absolute paths are allowed. Empty means current entrypoint.
protected string $addEntrypoint
Résultat string

$addIcon protected_oe property

Defines the icon for the add button. Relative to media/ or #className for vector images
protected $addIcon

$addMultiple protected_oe property

protected $addMultiple

$addMultipleFieldContainerWidth protected_oe property

protected $addMultipleFieldContainerWidth

$addMultipleFields protected_oe property

protected $addMultipleFields

$addMultipleFixedFields protected_oe property

protected $addMultipleFixedFields

$allowCustomFieldSelection protected_oe property

(?fields=...)
protected bool $allowCustomFieldSelection
Résultat boolean

$asNested protected_oe property

Is automatically set when object property is defined.
protected bool $asNested
Résultat boolean

$columns protected_oe property

This is used by the listing crud window (and GET of the REST api) Only one level, no children, no tabs. Use the crud editor, to get the list of possible types.
protected array $columns
Résultat array

$conditionOperator protected_oe property

protected ConditionOperator,Jarves $conditionOperator
Résultat Jarves\ConditionOperator

$customOrderBy protected_oe property

Order field
protected string $customOrderBy
Résultat string

$defaultLimit protected_oe property

Defines how many items should be displayed per page.
protected $defaultLimit

$domain protected_oe property

The current domain id to filter if domainDepended is enabled.
protected int $domain
Résultat integer

$domainDepended protected_oe property

Note: Your table need a field 'domain_id' int. The windowList class filter by this.
protected bool $domainDepended
Résultat boolean

$edit protected_oe property

Defines whether the edit button should be displayed
protected bool $edit
Résultat boolean

$editEntrypoint protected_oe property

Default is /. Relative or absolute paths are allowed. Empty means current entrypoint.
protected string $editEntrypoint
Résultat string

$editIcon protected_oe property

Defines the icon for the edit button. Relative to media/ or #className for vector images
protected $editIcon

$eventDispatcher protected_oe property

protected EventDispatcherInterface,Symfony\Component\EventDispatcher $eventDispatcher
Résultat Symfony\Component\EventDispatcher\EventDispatcherInterface

$extraSelection protected_oe property

Only field names allowed that are available by the underlying object. Comma separated or as array.
protected string|array $extraSelection
Résultat string | array

$fields protected_oe property

Can contains several fields nested, via 'children', also type 'tab' are allowed. Every jarves.field is allowed.
protected array $fields
Résultat array

$filter protected_oe property

Contains the fields for the search.
protected array $filter
Résultat array

$filterFields protected_oe property

protected array $filterFields
Résultat array

$itemLayout protected_oe property

protected string $itemLayout
Résultat string

$itemsPerPage protected_oe property

protected int $itemsPerPage
Résultat integer

$jarves protected_oe property

protected Jarves,Jarves $jarves
Résultat Jarves\Jarves

$language protected_oe property

The current language to filter if multiLanguage is enabled.
protected string $language
Résultat string

$multiLanguage protected_oe property

Note: Your table need a field 'lang' varchar(2). The windowList class filter by this. If the object is nested=true and have a root object
protected bool $multiLanguage
Résultat boolean

$nestedAddWithPositionSelection protected_oe property

protected $nestedAddWithPositionSelection

$nestedMoveable protected_oe property

protected $nestedMoveable

$nestedRootAdd protected_oe property

protected $nestedRootAdd

$nestedRootAddEntrypoint protected_oe property

protected $nestedRootAddEntrypoint

$nestedRootAddIcon protected_oe property

protected $nestedRootAddIcon

$nestedRootAddLabel protected_oe property

protected $nestedRootAddLabel

$nestedRootEdit protected_oe property

protected $nestedRootEdit

$nestedRootEditEntrypoint protected_oe property

protected $nestedRootEditEntrypoint

$nestedRootRemove protected_oe property

protected $nestedRootRemove

$nestedRootRemoveEntrypoint protected_oe property

protected $nestedRootRemoveEntrypoint

$newLabel protected_oe property

protected $newLabel

$object protected_oe property

Defines the object which should be used.
protected $object

$objectBased protected_oe property

Whether this CRUD view is based on a object with an id.
protected bool $objectBased
Résultat boolean

$objectDefinition protected_oe property

Copy of the object definition, by is being set in the initialisation. Only set when object property is defined.
protected Object,Jarves\Configuration $objectDefinition
Résultat Jarves\Configuration\Object

$objects protected_oe property

protected Objects,Jarves $objects
Résultat Jarves\Objects

$order protected_oe property

array( array('field' => 'group_id', 'direction' => 'asc'), array('field' => 'title', 'direction' => 'asc') ); or array( 'group_id' => 'asc', 'title' => 'desc' )
protected array $order
Résultat array

$orderBy protected_oe property

Order field
protected string $orderBy
Résultat string

$orderByDirection protected_oe property

Order direction
protected string $orderByDirection
Résultat string

$permissionCheck protected_oe property

Deactivate this means this object does not listen to any ACL.
protected bool $permissionCheck
Résultat boolean

$primary protected_oe property

Example: $primary = array('id'); Example: $primary = array('id', 'name'); Use this only if you know, what you're doing, normally this comes from the object settings.
protected array $primary
Résultat array

$primaryKey protected_oe property

If the class created a item through addItem(), it contains the primary key of the newly created item. array( 'id' => 1234 ) array( 'id' => 1234, 'subId' => 5678 )
See also: getPrimaryKey()
protected array $primaryKey
Résultat array

$remove protected_oe property

Defines whether the remove/delete button should be displayed Also on each row the Delete-Button and the checkboxes.
protected bool $remove
Résultat boolean

$removeEntrypoint protected_oe property

protected string $removeEntrypoint
Résultat string

$removeIcon protected_oe property

Defines the icon for the remove/delete button. Relative to media/ or #className for vector images
protected $removeIcon

$removeIconItem protected_oe property

Defines the icon for the remove/delete button. Relative to media/ or #className for vector images
protected $removeIconItem

$requestStack protected_oe property

protected RequestStack,Symfony\Component\HttpFoundation $requestStack
Résultat Symfony\Component\HttpFoundation\RequestStack

$startCombine protected_oe property

protected $startCombine

$table protected_oe property

Use this only if you know, what you're doing, normally this comes from the object definition from the object property.
protected $table

$translator protected_oe property

protected Translator,Jarves\Translation $translator
Résultat Jarves\Translation\Translator

$usePatch protected_oe property

'PUT' requires that you send all field, and 'PATCH' only the fields that need to be updated.
protected bool $usePatch
Résultat boolean

$utils protected_oe property

protected Utils,Jarves $utils
Résultat Jarves\Utils

$withNewsFeed protected_oe property

protected bool $withNewsFeed
Résultat boolean

$workspace protected_oe property

Needs a column workspace_id in the table or active workspace at object.
protected bool $workspace
Résultat boolean