mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-25 00:53:48 +00:00
add a custom field long choice basic
The `custom field long choice` aim to provide a way to deal with choices with a big possibilities. The `custom field long choice` allow : - to persist different options in the database ; - each option has a key, a text (translatable string), and eventually a parent, and an internal_key - every key can be activate or not. If the parent is inactivated, all childs are inactivated - the internal key have two purposes : - link to an external csv file, with their own key ; - add a special class to results, to allow custom layout. Currently, the field exists, but some elements are missing : - a script for CSV import - possibility to select multiple items - edition of options - handle of option without parents - tests are missing
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option:
|
||||
type: entity
|
||||
table: custom_field_long_choice_options
|
||||
repositoryClass: Chill\CustomFieldsBundle\EntityRepository\CustomFieldLongChoice\OptionRepository
|
||||
id:
|
||||
id:
|
||||
type: integer
|
||||
id: true
|
||||
generator:
|
||||
strategy: AUTO
|
||||
fields:
|
||||
key:
|
||||
type: string
|
||||
length: 15
|
||||
text:
|
||||
type: json_array
|
||||
internalKey:
|
||||
type: string
|
||||
length: 50
|
||||
column: internal_key
|
||||
active:
|
||||
type: boolean
|
||||
default: true
|
||||
oneToMany:
|
||||
children:
|
||||
targetEntity: Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option
|
||||
mappedBy: parent
|
||||
manyToOne:
|
||||
parent:
|
||||
targetEntity: Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option
|
||||
inversedBy: children
|
||||
nullable: true
|
||||
|
Reference in New Issue
Block a user