{% if admin.hasAccess('edit', object) and admin.hasRoute('edit') and not object.mandatory %} {{ 'action_edit'|trans({}, 'SonataAdminBundle') }} {% endif %}