PHP Class eZ\Publish\Core\Helper\FieldHelper

Mostrar archivo Open project: ezsystems/ezpublish-kernel Class Usage Examples

Public Methods

Method Description
__construct ( TranslationHelper $translationHelper, eZ\Publish\API\Repository\ContentTypeService $contentTypeService, eZ\Publish\API\Repository\FieldTypeService $fieldTypeService )
getFieldDefinition ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, string $fieldDefIdentifier ) : eZ\Publish\API\Repository\Values\ContentType\FieldDefinition Returns FieldDefinition object based on $contentInfo and $fieldDefIdentifier.
isFieldEmpty ( eZ\Publish\API\Repository\Values\Content\Content $content, string $fieldDefIdentifier, null $forcedLanguage = null ) : boolean Checks if provided field can be considered empty.

Method Details

__construct() public method

public __construct ( TranslationHelper $translationHelper, eZ\Publish\API\Repository\ContentTypeService $contentTypeService, eZ\Publish\API\Repository\FieldTypeService $fieldTypeService )
$translationHelper TranslationHelper
$contentTypeService eZ\Publish\API\Repository\ContentTypeService
$fieldTypeService eZ\Publish\API\Repository\FieldTypeService

getFieldDefinition() public method

Returns FieldDefinition object based on $contentInfo and $fieldDefIdentifier.
public getFieldDefinition ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, string $fieldDefIdentifier ) : eZ\Publish\API\Repository\Values\ContentType\FieldDefinition
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$fieldDefIdentifier string
return eZ\Publish\API\Repository\Values\ContentType\FieldDefinition

isFieldEmpty() public method

Checks if provided field can be considered empty.
public isFieldEmpty ( eZ\Publish\API\Repository\Values\Content\Content $content, string $fieldDefIdentifier, null $forcedLanguage = null ) : boolean
$content eZ\Publish\API\Repository\Values\Content\Content
$fieldDefIdentifier string
$forcedLanguage null
return boolean