Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Core/Repository/SiteAccessAware/LanguageService.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Repository\SiteAccessAware;
8
9 use eZ\Publish\API\Repository\LanguageService as LanguageServiceInterface;
10 use eZ\Publish\API\Repository\Values\Content\LanguageCreateStruct;
11 use eZ\Publish\API\Repository\Values\Content\Language;
12
18 class LanguageService implements LanguageServiceInterface
19 {
21 protected $service;
22
28 public function __construct(
29 LanguageServiceInterface $service
30 ) {
31 $this->service = $service;
32 }
33
34 public function createLanguage(LanguageCreateStruct $languageCreateStruct)
35 {
36 return $this->service->createLanguage($languageCreateStruct);
37 }
38
39 public function updateLanguageName(Language $language, $newName)
40 {
41 return $this->service->updateLanguageName($language, $newName);
42 }
43
44 public function enableLanguage(Language $language)
45 {
46 return $this->service->enableLanguage($language);
47 }
48
49 public function disableLanguage(Language $language)
50 {
51 return $this->service->disableLanguage($language);
52 }
53
54 public function loadLanguage($languageCode)
55 {
56 return $this->service->loadLanguage($languageCode);
57 }
58
59 public function loadLanguages()
60 {
61 return $this->service->loadLanguages();
62 }
63
64 public function loadLanguageById($languageId)
65 {
66 return $this->service->loadLanguageById($languageId);
67 }
68
69 public function loadLanguageListByCode(array $languageCodes): iterable
70 {
71 return $this->service->loadLanguageListByCode($languageCodes);
72 }
73
74 public function loadLanguageListById(array $languageIds): iterable
75 {
76 return $this->service->loadLanguageListById($languageIds);
77 }
78
79 public function deleteLanguage(Language $language)
80 {
81 return $this->service->deleteLanguage($language);
82 }
83
84 public function getDefaultLanguageCode()
85 {
86 return $this->service->getDefaultLanguageCode();
87 }
88
89 public function newLanguageCreateStruct()
90 {
91 return $this->service->newLanguageCreateStruct();
92 }
93 }
eZ\Publish\API\Repository\Values\Content\LanguageCreateStruct
This class represents a value for creating a language.
Definition: LanguageCreateStruct.php:15
eZ\Publish\API\Repository\Values\Content\Language
Definition: API/Repository/Values/Content/Language.php:20
eZ\Publish\Core\Repository\SiteAccessAware\LanguageService
LanguageService for SiteAccessAware layer.
Definition: Core/Repository/SiteAccessAware/LanguageService.php:19
eZ\Publish\Core\Repository\SiteAccessAware\LanguageService\__construct
__construct(LanguageServiceInterface $service)
Construct service object from aggregated service.
Definition: Core/Repository/SiteAccessAware/LanguageService.php:28
eZ\Publish\Core\Repository\SiteAccessAware\LanguageService\loadLanguageListById
loadLanguageListById(array $languageIds)
Bulk-load Languages by ids.
Definition: Core/Repository/SiteAccessAware/LanguageService.php:74
eZ\Publish\Core\Repository\SiteAccessAware\LanguageService\enableLanguage
enableLanguage(Language $language)
Enables a language.
Definition: Core/Repository/SiteAccessAware/LanguageService.php:44
eZ\Publish\Core\Repository\SiteAccessAware\LanguageService\getDefaultLanguageCode
getDefaultLanguageCode()
Returns a configured default language code.
Definition: Core/Repository/SiteAccessAware/LanguageService.php:84
eZ\Publish\Core\Repository\SiteAccessAware\LanguageService\newLanguageCreateStruct
newLanguageCreateStruct()
Instantiates an object to be used for creating languages.
Definition: Core/Repository/SiteAccessAware/LanguageService.php:89
eZ\Publish\Core\Repository\SiteAccessAware\LanguageService\loadLanguages
loadLanguages()
Loads all Languages.
Definition: Core/Repository/SiteAccessAware/LanguageService.php:59
eZ\Publish\Core\Repository\SiteAccessAware\LanguageService\$service
$service
Definition: Core/Repository/SiteAccessAware/LanguageService.php:21
eZ\Publish\Core\Repository\SiteAccessAware\LanguageService\createLanguage
createLanguage(LanguageCreateStruct $languageCreateStruct)
Creates the a new Language in the content repository.
Definition: Core/Repository/SiteAccessAware/LanguageService.php:34
eZ\Publish\Core\Repository\SiteAccessAware\LanguageService\loadLanguageListByCode
loadLanguageListByCode(array $languageCodes)
Bulk-load Languages by language codes.
Definition: Core/Repository/SiteAccessAware/LanguageService.php:69
eZ\Publish\Core\Repository\SiteAccessAware\LanguageService\updateLanguageName
updateLanguageName(Language $language, $newName)
Changes the name of the language in the content repository.
Definition: Core/Repository/SiteAccessAware/LanguageService.php:39
eZ\Publish\Core\Repository\SiteAccessAware\LanguageService\disableLanguage
disableLanguage(Language $language)
Disables a language.
Definition: Core/Repository/SiteAccessAware/LanguageService.php:49
eZ\Publish\Core\Repository\SiteAccessAware\LanguageService\loadLanguageById
loadLanguageById($languageId)
Loads a Language by its id ($languageId).
Definition: Core/Repository/SiteAccessAware/LanguageService.php:64
eZ\Publish\Core\Repository\SiteAccessAware\LanguageService\loadLanguage
loadLanguage($languageCode)
Loads a Language from its language code ($languageCode).
Definition: Core/Repository/SiteAccessAware/LanguageService.php:54
eZ\Publish\Core\Repository\SiteAccessAware\LanguageService\deleteLanguage
deleteLanguage(Language $language)
Deletes a language from content repository.
Definition: Core/Repository/SiteAccessAware/LanguageService.php:79
eZ\Publish\API\Repository\LanguageService
Language service, used for language operations.
Definition: API/Repository/LanguageService.php:16
eZ\Publish\Core\Repository\SiteAccessAware
Definition: Core/Repository/SiteAccessAware/ContentService.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.