[AdminGenerator] affichage dans filtres et champs du backend
Bonjour à tous,
Mon site avance bien mais j'ai encore quelques soucis.
A savoir que j'ai généré un module d'administration dans mon backend permettant d'ajouter, editer, supprimer des objets du catalogue.
J'ai un petit problème dans mes champs qui ont une relation sur mon schema.yml! En effet, par exemple pour le champs index_marque il m'affiche un select qui a pour option les champs descriptions de ma table marque. J'ai modifié pour qu'au lieu d'afficher la description, il m'affiche le nom de la marque à l'aide de la fonction __toString.
Cependant pour le champs index gamme j'ai un champs input texte. Je souhaiterais avoir un select avec les options correspondant à ma gamme
Pour mieux vous éclairer, voici un apercu de mon schema.yml:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
| Catalogue:
connection: doctrine
tableName: catalogue
actAs:
Commentable:
columns:
id:
type: integer(4)
fixed: false
unsigned: false
primary: true
autoincrement: true
index_famille:
type: integer(4)
fixed: false
unsigned: false
primary: false
default: '0'
notnull: true
autoincrement: false
designation:
type: string(255)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
index_marque:
type: integer(4)
fixed: false
unsigned: false
primary: false
default: '0'
notnull: true
autoincrement: false
relations:
JointuresGammes:
local: id
foreign: index_catalogue
type: many
Gammes:
connection: doctrine
tableName: gammes
columns:
id:
type: integer(4)
fixed: false
unsigned: false
primary: true
autoincrement: true
intitule:
type: string()
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
description:
type: string()
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
relations:
JointuresGammes:
local: id
foreign: index_gamme
type: many
JointuresGammes:
connection: doctrine
tableName: jointures_gammes
columns:
index_catalogue:
type: integer(4)
fixed: false
unsigned: false
primary: true
autoincrement: false
index_gamme:
type: integer(4)
fixed: false
unsigned: false
primary: true
autoincrement: false
relations:
Catalogue:
local: index_catalogue
foreign: id
type: one
Gammes:
local: index_gamme
foreign: id
type: one |
Par exemple j'aimerai avoir dans les options le champs intitule de ma table gammes.
Est-ce faisable?
Si oui comment: _toString sur quelle table??
Merci