Topics
- OroEntityBundle (UI for entities)
- OroEntityExtendBundle (extend functionality)
Changes
src/Acme/Bundle/TaskBundle
Resources
config
datagrid.yml (updated)
views
Task
view.html.twig (updated)
update.html.twig (updated)
- Ensure Task entity extends ExtendTask class
class Task extends ExtendTask
-
Go to System -> Entties and check "Is extend" column for Task
-
Add field to Task entity
-
Click "Update schema" button
-
Update Acme/Bundle/TaskBundle/Resources/config/datagrid.yml
extended_entity_name: %acme_task.entity.class%
-
Check new field in grid
-
Update Acme/Bundle/TaskBundle/Resources/views/Task/view.html.twig
{% import 'OroEntityConfigBundle::macros.html.twig' as entityConfig %}
{{ entityConfig.renderDynamicFields(entity) }}
-
Check view page of Task
-
Update Acme/Bundle/TaskBundle/Resources/views/Task/update.html.twig
{% if form.additional is defined and form.additional.children|length > 0 %}
{% set additionalData = [] %}
{% for value in form.additional %}
{% set additionalData = additionalData|merge([form_row(value)]) %}
{% endfor %}
{% set dataBlocks = dataBlocks|merge([{
'title': 'Additional'|trans,
'subblocks': [{
'title': '',
'useSpan': false,
'data' : additionalData
}]
}] ) %}
{% endif %}
- Check form page of Task