PHP Класс Jarves\Admin\ObjectCrud

Наследование: implements Jarves\Admin\ObjectCrudInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_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.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
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 )

Описание методов

__construct() публичный Метод

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() публичный Метод

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
Результат mixed false if some went wrong or a array with the new primary keys.

addMultiple() публичный Метод

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
Результат array | mixed

applyDefaultSelection() защищенный Метод

Adds labelField, extraSelection and filter by blacklistSelection
protected applyDefaultSelection ( array $fields ) : array
$fields array
Результат array

buildFilter() публичный статический Метод

public static buildFilter ( array $filter ) : array | null
$filter array
Результат array | null

collectData() публичный Метод

public collectData ( Request | array $requestData ) : array
$requestData Symfony\Component\HttpFoundation\Request | array *@return array
Результат array

convertToFieldObjects() защищенный Метод

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

ensureLanguageField() защищенный Метод

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

getAdd() публичный Метод

public getAdd ( ) : boolean
Результат boolean

getAddEntrypoint() публичный Метод

public getAddEntrypoint ( ) : string
Результат string

getAddIcon() публичный Метод

public getAddIcon ( ) : string
Результат string

getAddMultiple() публичный Метод

public getAddMultiple ( )

getAddMultipleFieldContainerWidth() публичный Метод

getAddMultipleFields() публичный Метод

getAddMultipleFixedFields() публичный Метод

getAllowCustomFieldSelection() публичный Метод

public getAllowCustomFieldSelection ( ) : boolean
Результат boolean

getAsNested() публичный Метод

public getAsNested ( ) : boolean
Результат boolean

getBranchChildrenCount() публичный Метод

Returns items count per branch.
public getBranchChildrenCount ( mixed $pk = null, mixed $scope = null, array $filter = null ) : array
$pk mixed
$scope mixed
$filter array
Результат array

getBranchItems() публичный Метод

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
Результат mixed

getBranchItemsSelection() защищенный Метод

Returns the field list for branchItems selection.
protected getBranchItemsSelection ( string | array $fields = null ) : array
$fields string | array
Результат array

getColumns() публичный Метод

public getColumns ( ) : array
Результат array

getCondition() публичный Метод

Here you can define additional conditions for all operations (edit/listing).
public getCondition ( ) : Condition
Результат Jarves\Configuration\Condition definition

getCount() публичный Метод

public getCount ( Condition | array $filter, string $query = '' ) : integer
$filter Jarves\Configuration\Condition | array
$query string
Результат integer

getCustomEditCondition() публичный Метод

Here you can define additional conditions for edit operations.
public getCustomEditCondition ( ) : Condition
Результат Jarves\Configuration\Condition definition

getCustomListingCondition() публичный Метод

Here you can define additional conditions for listing operations.
public getCustomListingCondition ( ) : Condition
Результат Jarves\Configuration\Condition definition

getCustomOrderBy() публичный Метод

public getCustomOrderBy ( ) : string
Результат string

getDefaultFieldList() публичный Метод

Get a list of field key for $this->_fields
public getDefaultFieldList ( ) : array
Результат array

getDefaultLimit() публичный Метод

public getDefaultLimit ( ) : integer
Результат integer

getDomain() публичный Метод

The current domain id to filter if domainDepended is enabled.
public getDomain ( ) : integer
Результат integer

getDomainDepended() публичный Метод

public getDomainDepended ( ) : boolean
Результат boolean

getEdit() публичный Метод

public getEdit ( ) : boolean
Результат boolean

getEditEntrypoint() публичный Метод

public getEditEntrypoint ( ) : string
Результат string

getEditIcon() публичный Метод

public getEditIcon ( ) : string
Результат string

getExtraSelection() публичный Метод

public getExtraSelection ( ) : array
Результат array

getFields() публичный Метод

public getFields ( ) : Field[]
Результат Jarves\Configuration\Field[]

getFilter() публичный Метод

public getFilter ( ) : array
Результат array

getFilterFields() публичный Метод

public getFilterFields ( )

getInfo() публичный Метод

public getInfo ( )

getInitializedFields() публичный Метод

public getInitializedFields ( ) : Field[]
Результат Jarves\Configuration\Field[]

getItem() публичный Метод

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
Результат array

getItemLayout() публичный Метод

public getItemLayout ( )

getItemSelection() защищенный Метод

Returns the field list for single item selection.
protected getItemSelection ( string | array $fields = null ) : array
$fields string | array
Результат array

getItems() публичный Метод

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
Результат array

getItemsPerPage() публичный Метод

public getItemsPerPage ( ) : integer
Результат integer

getItemsSelection() защищенный Метод

Returns the field list for items selection.
protected getItemsSelection ( string | array $fields = null ) : array
$fields string | array
Результат array

getLanguage() публичный Метод

The current language to filter if multiLanguage is enabled.
public getLanguage ( ) : string
Результат string

getMultiLanguage() публичный Метод

public getMultiLanguage ( ) : boolean
Результат boolean

getNestedAddWithPositionSelection() публичный Метод

getNestedMoveable() публичный Метод

public getNestedMoveable ( )

getNestedRootAdd() публичный Метод

public getNestedRootAdd ( )

getNestedRootAddEntrypoint() публичный Метод

getNestedRootAddIcon() публичный Метод

getNestedRootAddLabel() публичный Метод

getNestedRootEdit() публичный Метод

public getNestedRootEdit ( )

getNestedRootEditEntrypoint() публичный Метод

getNestedRootRemove() публичный Метод

public getNestedRootRemove ( )

getNestedRootRemoveEntrypoint() публичный Метод

getNestedSelection() защищенный Метод

protected getNestedSelection ( $fields )

getNewLabel() публичный Метод

public getNewLabel ( )

getObject() публичный Метод

public getObject ( ) : string
Результат string

getObjectBased() публичный Метод

public getObjectBased ( ) : boolean
Результат boolean

getObjectDefinition() публичный Метод

public getObjectDefinition ( ) : Object
Результат Jarves\Configuration\Object

getOrder() публичный Метод

public getOrder ( ) : array
Результат array

getOrderBy() публичный Метод

public getOrderBy ( ) : string
Результат string

getOrderByDirection() публичный Метод

public getOrderByDirection ( ) : string
Результат string

getParent() публичный Метод

public getParent ( $pk, $fields = null )

getParents() публичный Метод

public getParents ( $pk )

getPermissionCheck() публичный Метод

public getPermissionCheck ( ) : boolean
Результат boolean

getPosition() публичный Метод

public getPosition ( $pk, $order )

getPrimary() публичный Метод

public getPrimary ( ) : array
Результат array

getPrimaryKey() публичный Метод

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
Результат array

getQueryCondition() защищенный Метод

protected getQueryCondition ( $query, $fields )

getRemove() публичный Метод

public getRemove ( ) : boolean
Результат boolean

getRemoveEntrypoint() публичный Метод

public getRemoveEntrypoint ( )

getRemoveIcon() публичный Метод

public getRemoveIcon ( ) : string
Результат string

getRemoveIconItem() публичный Метод

public getRemoveIconItem ( ) : string
Результат string

getRoot() публичный Метод

public getRoot ( $scope = null )

getRoots() публичный Метод

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

getStartCombine() публичный Метод

public getStartCombine ( ) : boolean
Результат boolean

getTable() публичный Метод

public getTable ( ) : string
Результат string

getTreeFields() публичный Метод

public getTreeFields ( string $fields = null ) : array
$fields string
Результат array

getUsePatch() публичный Метод

public getUsePatch ( ) : boolean
Результат boolean

getWithNewsFeed() публичный Метод

public getWithNewsFeed ( ) : boolean
Результат boolean

getWorkspace() публичный Метод

public getWorkspace ( ) : boolean
Результат boolean

initialize() публичный Метод

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

isObjectBased() публичный Метод

public isObjectBased ( ) : boolean
Результат boolean

mapData() публичный Метод

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
Результат array

moveItem() публичный Метод

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

patch() публичный Метод

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
Результат boolean

prepareFieldAcl() публичный Метод

public prepareFieldAcl ( &$item )

prepareFieldDefinition() публичный Метод

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() публичный Метод

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

prepareRow() публичный Метод

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
Результат array

remove() публичный Метод

public remove ( $pk ) : boolean
$pk
Результат boolean

setAdd() публичный Метод

public setAdd ( boolean $add )
$add boolean

setAddEntrypoint() публичный Метод

public setAddEntrypoint ( string $addEntrypoint )
$addEntrypoint string

setAddIcon() публичный Метод

public setAddIcon ( string $addIcon )
$addIcon string

setAddMultiple() публичный Метод

public setAddMultiple ( $addMultiple )

setAddMultipleFieldContainerWidth() публичный Метод

public setAddMultipleFieldContainerWidth ( $addMultipleFieldContainerWidth )

setAddMultipleFields() публичный Метод

public setAddMultipleFields ( $addMultipleFields )

setAddMultipleFixedFields() публичный Метод

public setAddMultipleFixedFields ( $addMultipleFixedFields )

setAllowCustomFieldSelection() публичный Метод

public setAllowCustomFieldSelection ( boolean $allowExtraFieldSelection )
$allowExtraFieldSelection boolean

setAsNested() публичный Метод

public setAsNested ( boolean $asNested )
$asNested boolean

setColumns() публичный Метод

public setColumns ( array $columns )
$columns array

setCustomOrderBy() публичный Метод

public setCustomOrderBy ( string $customOrderBy )
$customOrderBy string

setDefaultLimit() публичный Метод

public setDefaultLimit ( integer $defaultLimit )
$defaultLimit integer

setDomain() публичный Метод

public setDomain ( integer $domain )
$domain integer

setDomainDepended() публичный Метод

public setDomainDepended ( boolean $domainDepended )
$domainDepended boolean

setEdit() публичный Метод

public setEdit ( boolean $edit )
$edit boolean

setEditEntrypoint() публичный Метод

public setEditEntrypoint ( string $editEntrypoint )
$editEntrypoint string

setEditIcon() публичный Метод

public setEditIcon ( $editIcon )

setExtraSelection() публичный Метод

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

setFields() публичный Метод

public setFields ( array $fields )
$fields array

setFilter() публичный Метод

public setFilter ( array $filter )
$filter array

setFilterFields() публичный Метод

public setFilterFields ( $filterFields )

setItemLayout() публичный Метод

public setItemLayout ( $itemLayout )

setItemsPerPage() публичный Метод

public setItemsPerPage ( integer $itemsPerPage )
$itemsPerPage integer

setLanguage() публичный Метод

public setLanguage ( string $language )
$language string

setMultiLanguage() публичный Метод

public setMultiLanguage ( boolean $multiLanguage )
$multiLanguage boolean

setNestedAddWithPositionSelection() публичный Метод

public setNestedAddWithPositionSelection ( $nestedAddWithPositionSelection )

setNestedMoveable() публичный Метод

public setNestedMoveable ( $nestedMoveable )

setNestedRootAdd() публичный Метод

public setNestedRootAdd ( $nestedRootAdd )

setNestedRootAddEntrypoint() публичный Метод

public setNestedRootAddEntrypoint ( $nestedRootAddEntrypoint )

setNestedRootAddIcon() публичный Метод

public setNestedRootAddIcon ( $nestedRootAddIcon )

setNestedRootAddLabel() публичный Метод

public setNestedRootAddLabel ( $nestedRootAddLabel )

setNestedRootEdit() публичный Метод

public setNestedRootEdit ( $nestedRootEdit )

setNestedRootEditEntrypoint() публичный Метод

public setNestedRootEditEntrypoint ( $nestedRootEditEntrypoint )

setNestedRootRemove() публичный Метод

public setNestedRootRemove ( $nestedRootRemove )

setNestedRootRemoveEntrypoint() публичный Метод

public setNestedRootRemoveEntrypoint ( $nestedRootRemoveEntrypoint )

setNewLabel() публичный Метод

public setNewLabel ( $newLabel )

setObject() публичный Метод

public setObject ( string $object )
$object string

setObjectBased() публичный Метод

public setObjectBased ( boolean $objectBased )
$objectBased boolean

setObjectDefinition() публичный Метод

public setObjectDefinition ( array $objectDefinition )
$objectDefinition array

setOrder() публичный Метод

public setOrder ( array $order )
$order array

setOrderBy() публичный Метод

public setOrderBy ( string $orderBy )
$orderBy string

setOrderByDirection() публичный Метод

public setOrderByDirection ( string $orderByDirection )
$orderByDirection string

setPermissionCheck() публичный Метод

public setPermissionCheck ( boolean $permissionCheck )
$permissionCheck boolean

setPrimary() публичный Метод

public setPrimary ( array $primary )
$primary array

setRemove() публичный Метод

public setRemove ( boolean $remove )
$remove boolean

setRemoveEntrypoint() публичный Метод

public setRemoveEntrypoint ( $removeEntrypoint )

setRemoveIcon() публичный Метод

public setRemoveIcon ( string $removeIcon )
$removeIcon string

setRemoveIconItem() публичный Метод

public setRemoveIconItem ( string $removeIconItem )
$removeIconItem string

setStartCombine() публичный Метод

public setStartCombine ( boolean $startCombine )
$startCombine boolean

setTable() публичный Метод

public setTable ( string $table )
$table string

setUsePatch() публичный Метод

public setUsePatch ( boolean $usePatch )
$usePatch boolean

setWithNewsFeed() публичный Метод

public setWithNewsFeed ( boolean $withNewsFeed )
$withNewsFeed boolean

setWorkspace() публичный Метод

public setWorkspace ( boolean $workspace )
$workspace boolean

toIdIndex() публичный Метод

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

translate() публичный Метод

public translate ( &$field )
$field

translateFields() публичный Метод

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

update() публичный Метод

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
Результат boolean

Описание свойств

$_fields защищенное свойство

Flatten list of fields.
protected Field[],Jarves\Configuration $_fields
Результат Jarves\Configuration\Field[]

$acl защищенное свойство

protected ACL,Jarves $acl
Результат Jarves\ACL

$add защищенное свойство

Defines whether the add button should be displayed
protected bool $add
Результат boolean

$addEntrypoint защищенное свойство

Default is /. Relative or absolute paths are allowed. Empty means current entrypoint.
protected string $addEntrypoint
Результат string

$addIcon защищенное свойство

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

$addMultiple защищенное свойство

protected $addMultiple

$addMultipleFieldContainerWidth защищенное свойство

protected $addMultipleFieldContainerWidth

$addMultipleFields защищенное свойство

protected $addMultipleFields

$addMultipleFixedFields защищенное свойство

protected $addMultipleFixedFields

$allowCustomFieldSelection защищенное свойство

(?fields=...)
protected bool $allowCustomFieldSelection
Результат boolean

$asNested защищенное свойство

Is automatically set when object property is defined.
protected bool $asNested
Результат boolean

$columns защищенное свойство

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
Результат array

$conditionOperator защищенное свойство

protected ConditionOperator,Jarves $conditionOperator
Результат Jarves\ConditionOperator

$customOrderBy защищенное свойство

Order field
protected string $customOrderBy
Результат string

$defaultLimit защищенное свойство

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

$domain защищенное свойство

The current domain id to filter if domainDepended is enabled.
protected int $domain
Результат integer

$domainDepended защищенное свойство

Note: Your table need a field 'domain_id' int. The windowList class filter by this.
protected bool $domainDepended
Результат boolean

$edit защищенное свойство

Defines whether the edit button should be displayed
protected bool $edit
Результат boolean

$editEntrypoint защищенное свойство

Default is /. Relative or absolute paths are allowed. Empty means current entrypoint.
protected string $editEntrypoint
Результат string

$editIcon защищенное свойство

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

$eventDispatcher защищенное свойство

protected EventDispatcherInterface,Symfony\Component\EventDispatcher $eventDispatcher
Результат Symfony\Component\EventDispatcher\EventDispatcherInterface

$extraSelection защищенное свойство

Only field names allowed that are available by the underlying object. Comma separated or as array.
protected string|array $extraSelection
Результат string | array

$fields защищенное свойство

Can contains several fields nested, via 'children', also type 'tab' are allowed. Every jarves.field is allowed.
protected array $fields
Результат array

$filter защищенное свойство

Contains the fields for the search.
protected array $filter
Результат array

$filterFields защищенное свойство

protected array $filterFields
Результат array

$itemLayout защищенное свойство

protected string $itemLayout
Результат string

$itemsPerPage защищенное свойство

protected int $itemsPerPage
Результат integer

$jarves защищенное свойство

protected Jarves,Jarves $jarves
Результат Jarves\Jarves

$language защищенное свойство

The current language to filter if multiLanguage is enabled.
protected string $language
Результат string

$multiLanguage защищенное свойство

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
Результат boolean

$nestedAddWithPositionSelection защищенное свойство

protected $nestedAddWithPositionSelection

$nestedMoveable защищенное свойство

protected $nestedMoveable

$nestedRootAdd защищенное свойство

protected $nestedRootAdd

$nestedRootAddEntrypoint защищенное свойство

protected $nestedRootAddEntrypoint

$nestedRootAddIcon защищенное свойство

protected $nestedRootAddIcon

$nestedRootAddLabel защищенное свойство

protected $nestedRootAddLabel

$nestedRootEdit защищенное свойство

protected $nestedRootEdit

$nestedRootEditEntrypoint защищенное свойство

protected $nestedRootEditEntrypoint

$nestedRootRemove защищенное свойство

protected $nestedRootRemove

$nestedRootRemoveEntrypoint защищенное свойство

protected $nestedRootRemoveEntrypoint

$newLabel защищенное свойство

protected $newLabel

$object защищенное свойство

Defines the object which should be used.
protected $object

$objectBased защищенное свойство

Whether this CRUD view is based on a object with an id.
protected bool $objectBased
Результат boolean

$objectDefinition защищенное свойство

Copy of the object definition, by is being set in the initialisation. Only set when object property is defined.
protected Object,Jarves\Configuration $objectDefinition
Результат Jarves\Configuration\Object

$objects защищенное свойство

protected Objects,Jarves $objects
Результат Jarves\Objects

$order защищенное свойство

array( array('field' => 'group_id', 'direction' => 'asc'), array('field' => 'title', 'direction' => 'asc') ); or array( 'group_id' => 'asc', 'title' => 'desc' )
protected array $order
Результат array

$orderBy защищенное свойство

Order field
protected string $orderBy
Результат string

$orderByDirection защищенное свойство

Order direction
protected string $orderByDirection
Результат string

$permissionCheck защищенное свойство

Deactivate this means this object does not listen to any ACL.
protected bool $permissionCheck
Результат boolean

$primary защищенное свойство

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
Результат array

$primaryKey защищенное свойство

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 )
См. также: getPrimaryKey()
protected array $primaryKey
Результат array

$remove защищенное свойство

Defines whether the remove/delete button should be displayed Also on each row the Delete-Button and the checkboxes.
protected bool $remove
Результат boolean

$removeEntrypoint защищенное свойство

protected string $removeEntrypoint
Результат string

$removeIcon защищенное свойство

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

$removeIconItem защищенное свойство

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

$requestStack защищенное свойство

protected RequestStack,Symfony\Component\HttpFoundation $requestStack
Результат Symfony\Component\HttpFoundation\RequestStack

$startCombine защищенное свойство

protected $startCombine

$table защищенное свойство

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 Translator,Jarves\Translation $translator
Результат Jarves\Translation\Translator

$usePatch защищенное свойство

'PUT' requires that you send all field, and 'PATCH' only the fields that need to be updated.
protected bool $usePatch
Результат boolean

$utils защищенное свойство

protected Utils,Jarves $utils
Результат Jarves\Utils

$withNewsFeed защищенное свойство

protected bool $withNewsFeed
Результат boolean

$workspace защищенное свойство

Needs a column workspace_id in the table or active workspace at object.
protected bool $workspace
Результат boolean