Diem uses the excellent symfony admin generator. But with some additions.
Diem is smart enough to write the generator.yml file for you. When you generate a new module with
php symfony dm:setup
The admin module is created, with a quite good generator.yml.
Later, if you add fields to the model, Diem will not add the fields to the generator.yml, because it may override your changes. So, if you want Diem to regenerate a generator.yml from the current model, use
php symfony dmAdmin:generate --clear=myModule
To customize the generator.yml, please see the symfony admin generator documentation and the Diem added configuration.
Diem admin generator comes with more features than the symfony one.
One symfony feature has been dropped : the filters. It has been replaced by a single-field search engine, that searches into all model fields.
Diem admin interface is heavily inspired by the Total Usability Blog and the Gmail interface.
config:
fields:
url:
is_link: true
title:
is_big: true
body:
markdown: true
When a field is marked as is_link, it becomes droppable.
TIP
When a database field contains a link, it's better to declare it in the schema.yml. This way, not only the admin generators knows how to deal with it, but the whole project too.
Diem admin forms are displayed in two columns.
When a field is marked as is_big, it uses the two columns.
When a textarea is marked as markdown, it is transformed into a markdown editor with an ajax preview.
TIP
When a database field contains markdown text, it's better to declare it in the schema.yml. This way, not only the admin generators knows how to deal with it, but the whole project too.
With symfony only, we can't sort list results by a partial column.
With Diem it's made possible if the partial has the same name than a database field.
For example suppose we have a "Product" model, with a "price" field.
We will create the "_price.php" template to show exclusive of taxes and inclusive of taxes prices.
When clicking on the list "_price" column, list will be sorted using the "price" field.
Questions and Feedback
If you need support or have a technical question, you can