0

I am working on easy admin list page. I have fields that depends on database. How could i add dynamic fields in yaml file ? Here season field may repeat depends on database

 list:
       title: "test"
       fields:
           - { property: name, label: "name" }
           - { property: season,  label: "season" }

1 Answers1

0

Add getter in your entity, like this:

public functioin getLowerName(): ?string
{
    return mb_strtolower($this->getNmae(), 'utf-8');
}

Add virtual field to yaml:

- { property: 'lowerName',  label: "Name in lower case" }
fdor
  • 157
  • 1
  • 8