Свойство | Тип | Описание | |
---|---|---|---|
$configResolver | eZ\Publish\Core\MVC\ConfigResolverInterface | ||
$contentService | eZ\Publish\API\Repository\ContentService |
Метод | Описание | |
---|---|---|
__construct ( eZ\Publish\Core\MVC\ConfigResolverInterface $configResolver, eZ\Publish\API\Repository\ContentService $contentService, array $siteAccessesByLanguage, Psr\Log\LoggerInterface $logger = null ) | ||
getAvailableLanguages ( ) : array | Returns the list of all available languages, including the ones configured in related SiteAccesses. | |
getTranslatedByMethod ( eZ\Publish\API\Repository\Values\ValueObject $object, string $method, string $forcedLanguage = null ) : string | null | Gets translated method generic helper. | |
getTranslatedByProperty ( eZ\Publish\API\Repository\Values\ValueObject $object, string $property, string $forcedLanguage = null ) : string | null | Gets translated property generic helper. | |
getTranslatedContentName ( eZ\Publish\API\Repository\Values\Content\Content $content, string $forcedLanguage = null ) : string | Returns content name, translated. | |
getTranslatedContentNameByContentInfo ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, string $forcedLanguage = null ) : string | Returns content name, translated, from a ContentInfo object. | |
getTranslatedField ( eZ\Publish\API\Repository\Values\Content\Content $content, string $fieldDefIdentifier, string $forcedLanguage = null ) : eZ\Publish\API\Repository\Values\Content\Field | null | Returns Field object in the appropriate language for a given content. | |
getTranslatedFieldDefinitionProperty ( eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, string $fieldDefIdentifier, string $property = 'name', string $forcedLanguage = null ) : string | null | Returns Field definition name in the appropriate language for a given content. | |
getTranslationSiteAccess ( string $languageCode ) : string | null | Returns a SiteAccess name for translation in $languageCode. |
Метод | Описание | |
---|---|---|
getLanguages ( string | null $forcedLanguage = null, string | null $fallbackLanguage = null ) : array | mixed | ||
getTranslatedContentNameByVersionInfo ( eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo, string $forcedLanguage = null ) : string | Returns content name, translated, from a VersionInfo object. |
public __construct ( eZ\Publish\Core\MVC\ConfigResolverInterface $configResolver, eZ\Publish\API\Repository\ContentService $contentService, array $siteAccessesByLanguage, Psr\Log\LoggerInterface $logger = null ) | ||
$configResolver | eZ\Publish\Core\MVC\ConfigResolverInterface | |
$contentService | eZ\Publish\API\Repository\ContentService | |
$siteAccessesByLanguage | array | |
$logger | Psr\Log\LoggerInterface |
public getAvailableLanguages ( ) : array | ||
Результат | array |
public getTranslatedByMethod ( eZ\Publish\API\Repository\Values\ValueObject $object, string $method, string $forcedLanguage = null ) : string | null | ||
$object | eZ\Publish\API\Repository\Values\ValueObject | Can be any kind of Value object which directly holds the methods that provides translated value. |
$method | string | Method name, example 'getName', 'description' |
$forcedLanguage | string | Locale we want the content name translation in (e.g. "fre-FR"). Null by default (takes current locale) |
Результат | string | null |
public getTranslatedByProperty ( 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 property |
$property | string | Property name, example 'names', 'descriptions' |
$forcedLanguage | string | Locale we want the content name translation in (e.g. "fre-FR"). Null by default (takes current locale) |
Результат | string | null |
public getTranslatedContentName ( eZ\Publish\API\Repository\Values\Content\Content $content, string $forcedLanguage = null ) : string | ||
$content | eZ\Publish\API\Repository\Values\Content\Content | |
$forcedLanguage | string | Locale we want the content name translation in (e.g. "fre-FR"). Null by default (takes current locale) |
Результат | string |
public getTranslatedContentNameByContentInfo ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, string $forcedLanguage = null ) : string | ||
$contentInfo | eZ\Publish\API\Repository\Values\Content\ContentInfo | |
$forcedLanguage | string | Locale we want the content name translation in (e.g. "fre-FR"). Null by default (takes current locale) |
Результат | string |
public getTranslatedField ( eZ\Publish\API\Repository\Values\Content\Content $content, string $fieldDefIdentifier, string $forcedLanguage = null ) : eZ\Publish\API\Repository\Values\Content\Field | null | ||
$content | eZ\Publish\API\Repository\Values\Content\Content | |
$fieldDefIdentifier | string | Field definition identifier. |
$forcedLanguage | string | Locale we want the field translation in (e.g. "fre-FR"). Null by default (takes current locale) |
Результат | eZ\Publish\API\Repository\Values\Content\Field | null |
public getTranslatedFieldDefinitionProperty ( eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, string $fieldDefIdentifier, string $property = 'name', string $forcedLanguage = null ) : string | null | ||
$contentType | eZ\Publish\API\Repository\Values\ContentType\ContentType | |
$fieldDefIdentifier | string | Field Definition identifier |
$property | string | Specifies if 'name' or 'description' should be used |
$forcedLanguage | string | Locale we want the field definition name translated in in (e.g. "fre-FR"). Null by default (takes current locale) |
Результат | string | null |
protected ConfigResolverInterface,eZ\Publish\Core\MVC $configResolver | ||
Результат | eZ\Publish\Core\MVC\ConfigResolverInterface |