Version compatibility
This Twig helper is available as of eZ Publish 5.2 / 2013.09
Description
ez_is_field_empty()
is a Twig helper which checks if a Content's field value is considered empty, in the current language.
It returns a boolean value (true
or false
).
Prototype and Arguments
ez_is_field_empty( eZ\Publish\Core\Repository\Values\Content\Content content, string fieldDefIdentifier[, string forcedLanguage] )
Argument name | Type | Description |
---|---|---|
content | eZ\Publish\Core\Repository\Values\Content\Content | Content object the displayable field belongs to. |
fieldDefIdentifier | string | Identifier of the field we want to check. |
forcedLanguage | string | Locale we want the content name translation in (e.g. "fre-FR"). Null by default (takes current locale) |
Usage