Class

eZ\Publish\Core\Helper\FieldHelper

class FieldHelper

Methods

__construct(TranslationHelper $translationHelper, ContentTypeService $contentTypeService, FieldTypeService $fieldTypeService)

bool isFieldEmpty(Content $content, string $fieldDefIdentifier, null $forcedLanguage = null)

Checks if provided field can be considered empty.

FieldDefinition getFieldDefinition(ContentInfo $contentInfo, string $fieldDefIdentifier)

Returns FieldDefinition object based on $contentInfo and $fieldDefIdentifier.

Details

at line 33
public __construct(TranslationHelper $translationHelper, ContentTypeService $contentTypeService, FieldTypeService $fieldTypeService)

Parameters

TranslationHelper $translationHelper
ContentTypeService $contentTypeService
FieldTypeService $fieldTypeService

at line 49
public bool isFieldEmpty(Content $content, string $fieldDefIdentifier, null $forcedLanguage = null)

Checks if provided field can be considered empty.

Parameters

Content $content
string $fieldDefIdentifier
null $forcedLanguage

Return Value

bool

at line 68
public FieldDefinition getFieldDefinition(ContentInfo $contentInfo, string $fieldDefIdentifier)

Returns FieldDefinition object based on $contentInfo and $fieldDefIdentifier.

Parameters

ContentInfo $contentInfo
string $fieldDefIdentifier

Return Value

FieldDefinition