{% set isIndex = view is defined and view == 'index' %} {% if dataValue|instanceof('DateTime') and not isIndex %} {{ dataValue|localizeddate('none', 'none', app.request.locale, null, "cccc d MMMM Y 'à' HH:mm"|trans) }} {% elseif property is defined and property == 'locale' %} {{ dataValue }} {% elseif dataValue|isEmail %} {{ dataValue }} {% elseif dataValue|isBool %} {% if dataValue == false %} {% else %} {% endif %} {% elseif dataValue|isObject and 'PersistentCollection' in dataValue|getClass or dataValue|isArray %} {% if dataValue %} {% endif %} {% elseif dataValue|isObject and 'User' in dataValue|getClass and not isIndex %} {{ dataValue.username }} {% if dataValue.email is defined and dataValue.email %} : {{ dataValue.email }} {% endif %} {% elseif dataValue|isObject and not dataValue|instanceof('DateTime') and 'User' not in dataValue|getClass %} {% if dataValue.adminName is defined and dataValue.adminName %} {{ dataValue.adminName }} {% elseif dataValue.id is defined %} {{ dataValue.id }} {% endif %} {% elseif not dataValue|isObject %} {% if truncate is defined and truncate %} {{ dataValue|striptags|truncate(truncate) }} {% else %} {{ dataValue }} {% endif %} {% endif %}