05.
Configuring the List Fields
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
Whoops, an error! Please, try again later.
4 Comments
Hi guys,
In my user entity I have set class constants relating to the user type, for example:
const TYPE_STAFF = 0;
const TYPE_SUPERVISOR = 1;
const TYPE_MANAGER = 2;
const TYPE_ADMIN = 3;
Is it possible to display something more descriptive in the list rather than just the id field?
Hey Shaun T.
You can define your constants using strings, e.g.
const TYPE_STAFF = 'Staff';Or you can implement a method
getUserType()that returns the specific string you need.Cheers!
Thanks MolloKhan, can you tell me how I can configure my easy_admin.yaml so that the userType value is displayed in the list view?
Give it a check to the "Virtual properties" section of the documentation: https://symfony.com/doc/mas...
I believe that's exactly what you need in this case
"Houston: no signs of life"
Start the conversation!