Property | Type | Description | |
---|---|---|---|
$fieldHelper | |||
$logger | Psr\Log\LoggerInterface | ||
$repository | eZ\Publish\API\Repository\Repository | ||
$translationHelper |
Method | Description | |
---|---|---|
__construct ( eZ\Publish\API\Repository\Repository $repository, |
||
getFirstFilledImageFieldIdentifier ( eZ\Publish\API\Repository\Values\Content\Content $content ) | ||
getFunctions ( ) : array | Returns a list of functions to add to the existing list. | |
getName ( ) : string | Returns the name of the extension. | |
getTranslatedContentName ( eZ\Publish\API\Repository\Values\ValueObject $content, string $forcedLanguage = null ) : string | ||
getTranslatedField ( eZ\Publish\API\Repository\Values\Content\Content $content, string $fieldDefIdentifier, string $forcedLanguage = null ) : eZ\Publish\API\Repository\Values\Content\Field | Returns the translated field, very similar to getTranslatedFieldValue but this returns the whole field. | |
getTranslatedFieldDefinitionDescription ( eZ\Publish\API\Repository\Values\ValueObject $content, string $fieldDefIdentifier, string $forcedLanguage = null ) : string | null | Gets name of a FieldDefinition description by loading ContentType based on Content/ContentInfo object. | |
getTranslatedFieldDefinitionName ( eZ\Publish\API\Repository\Values\ValueObject $content, string $fieldDefIdentifier, string $forcedLanguage = null ) : string | null | Gets name of a FieldDefinition name by loading ContentType based on Content/ContentInfo object. | |
getTranslatedFieldValue ( eZ\Publish\API\Repository\Values\Content\Content $content, string $fieldDefIdentifier, string $forcedLanguage = null ) : mixed | ||
getTranslatedProperty ( eZ\Publish\API\Repository\Values\ValueObject $object, string $property, string $forcedLanguage = null ) : string | null | Gets translated property generic helper. | |
isFieldEmpty ( eZ\Publish\API\Repository\Values\Content\Content $content, eZ\Publish\API\Repository\Values\Content\Field | string $fieldDefIdentifier, string $forcedLanguage = null ) : boolean | Checks if a given field is considered empty. |
Method | Description | |
---|---|---|
getContentType ( eZ\Publish\API\Repository\Values\ValueObject $content ) : eZ\Publish\API\Repository\Values\ContentType\ContentType | null | Get ContentType by Content/ContentInfo. |
public __construct ( eZ\Publish\API\Repository\Repository $repository, |
||
$repository | eZ\Publish\API\Repository\Repository | |
$translationHelper | ||
$fieldHelper | ||
$logger | Psr\Log\LoggerInterface |
public getFirstFilledImageFieldIdentifier ( eZ\Publish\API\Repository\Values\Content\Content $content ) | ||
$content | eZ\Publish\API\Repository\Values\Content\Content |
public getFunctions ( ) : array | ||
return | array |
public getTranslatedContentName ( eZ\Publish\API\Repository\Values\ValueObject $content, string $forcedLanguage = null ) : string | ||
$content | eZ\Publish\API\Repository\Values\ValueObject | Must be a valid Content or ContentInfo object. |
$forcedLanguage | string | Locale we want the content name translation in (e.g. "fre-FR"). Null by default (takes current locale) |
return | string |
public getTranslatedField ( eZ\Publish\API\Repository\Values\Content\Content $content, string $fieldDefIdentifier, string $forcedLanguage = null ) : eZ\Publish\API\Repository\Values\Content\Field | ||
$content | eZ\Publish\API\Repository\Values\Content\Content | |
$fieldDefIdentifier | string | Identifier for the field we want to get. |
$forcedLanguage | string | Locale we want the field in (e.g. "cro-HR"). Null by default (takes current locale). |
return | eZ\Publish\API\Repository\Values\Content\Field |
public getTranslatedFieldDefinitionDescription ( eZ\Publish\API\Repository\Values\ValueObject $content, string $fieldDefIdentifier, string $forcedLanguage = null ) : string | null | ||
$content | eZ\Publish\API\Repository\Values\ValueObject | Must be Content or ContentInfo object |
$fieldDefIdentifier | string | Identifier for the field we want to get the name from |
$forcedLanguage | string | Locale we want the content name translation in (e.g. "fre-FR"). Null by default (takes current locale) |
return | string | null |
public getTranslatedFieldDefinitionName ( eZ\Publish\API\Repository\Values\ValueObject $content, string $fieldDefIdentifier, string $forcedLanguage = null ) : string | null | ||
$content | eZ\Publish\API\Repository\Values\ValueObject | Must be Content or ContentInfo object |
$fieldDefIdentifier | string | Identifier for the field we want to get the name from |
$forcedLanguage | string | Locale we want the content name translation in (e.g. "fre-FR"). Null by default (takes current locale) |
return | string | null |
public getTranslatedFieldValue ( eZ\Publish\API\Repository\Values\Content\Content $content, string $fieldDefIdentifier, string $forcedLanguage = null ) : mixed | ||
$content | eZ\Publish\API\Repository\Values\Content\Content | |
$fieldDefIdentifier | string | Identifier for the field we want to get the value from. |
$forcedLanguage | string | Locale we want the content name translation in (e.g. "fre-FR"). Null by default (takes current locale). |
return | mixed | A primitive type or a field type Value object depending on the field type. |
public getTranslatedProperty ( eZ\Publish\API\Repository\Values\ValueObject $object, string $property, string $forcedLanguage = null ) : string | null | ||
$object | eZ\Publish\API\Repository\Values\ValueObject | Can be any kid of Value object which directly holds the translated data |
$property | string | Property name, example 'name', 'description' |
$forcedLanguage | string | Locale we want the content name translation in (e.g. "fre-FR"). Null by default (takes current locale) |
return | string | null |
public isFieldEmpty ( eZ\Publish\API\Repository\Values\Content\Content $content, eZ\Publish\API\Repository\Values\Content\Field | string $fieldDefIdentifier, string $forcedLanguage = null ) : boolean | ||
$content | eZ\Publish\API\Repository\Values\Content\Content | |
$fieldDefIdentifier | eZ\Publish\API\Repository\Values\Content\Field | string | Field or Field Identifier to get the value from. |
$forcedLanguage | string | Locale we want the content name translation in (e.g. "fre-FR"). Null by default (takes current locale). |
return | boolean |
protected FieldHelper,eZ\Publish\Core\Helper $fieldHelper | ||
return |
protected Repository,eZ\Publish\API\Repository $repository | ||
return | eZ\Publish\API\Repository\Repository |