Свойство | Type | Description | |
---|---|---|---|
$fieldHelper | |||
$logger | Psr\Log\LoggerInterface | ||
$repository | eZ\Publish\API\Repository\Repository | ||
$translationHelper |
Méthode | 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. |
Méthode | 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 | ||
Résultat | 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) |
Résultat | 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). |
Résultat | 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) |
Résultat | 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) |
Résultat | 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). |
Résultat | 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) |
Résultat | 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). |
Résultat | boolean |
protected FieldHelper,eZ\Publish\Core\Helper $fieldHelper | ||
Résultat |
protected LoggerInterface,Psr\Log $logger | ||
Résultat | Psr\Log\LoggerInterface |
protected Repository,eZ\Publish\API\Repository $repository | ||
Résultat | eZ\Publish\API\Repository\Repository |