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

Core/Repository/Values/Content/VersionInfo.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Repository\Values\Content;
8
9 use eZ\Publish\API\Repository\Values\Content\VersionInfo as APIVersionInfo;
10
28 class VersionInfo extends APIVersionInfo
29 {
31 protected $names;
32
34 protected $contentInfo;
35
46 protected $prioritizedNameLanguageCode;
47
51 public function getContentInfo()
52 {
53 return $this->contentInfo;
54 }
55
59 public function getNames()
60 {
61 return $this->names;
62 }
63
67 public function getName($languageCode = null)
68 {
69 if ($languageCode) {
70 return isset($this->names[$languageCode]) ? $this->names[$languageCode] : null;
71 }
72
73 if ($this->prioritizedNameLanguageCode) {
74 return $this->names[$this->prioritizedNameLanguageCode];
75 } elseif (!empty($this->contentInfo->alwaysAvailable) && isset($this->names[$this->contentInfo->mainLanguageCode])) {
76 return $this->names[$this->contentInfo->mainLanguageCode];
77 }
78
79 // Versioned name should always exists in initial language for a version so we use that as final fallback
80 return $this->names[$this->initialLanguageCode];
81 }
82 }
eZ\Publish\API\Repository\Values\Content\VersionInfo
Definition: API/Repository/Values/Content/VersionInfo.php:27
eZ\Publish\API\Repository\Values\Content\VersionInfo\$initialLanguageCode
$initialLanguageCode
Definition: API/Repository/Values/Content/VersionInfo.php:87
eZ\Publish\Core\Repository\Values\Content\VersionInfo
Definition: Core/Repository/Values/Content/VersionInfo.php:29
eZ\Publish\Core\Repository\Values\Content\VersionInfo\getName
getName($languageCode=null)
{Return the name of the domain object in a given language.If $languageCode is defined,...
Definition: Core/Repository/Values/Content/VersionInfo.php:67
eZ\Publish\Core\Repository\Values\Content\VersionInfo\$names
$names
Definition: Core/Repository/Values/Content/VersionInfo.php:31
eZ\Publish\Core\Repository\Values\Content\VersionInfo\$contentInfo
$contentInfo
Definition: Core/Repository/Values/Content/VersionInfo.php:34
eZ\Publish\Core\Repository\Values\Content\VersionInfo\getContentInfo
getContentInfo()
{Content of the content this version belongs to.\eZ\Publish\API\Repository\Values\Content\ContentInfo...
Definition: Core/Repository/Values/Content/VersionInfo.php:51
eZ\Publish\Core\Repository\Values\Content\VersionInfo\$prioritizedNameLanguageCode
$prioritizedNameLanguageCode
Definition: Core/Repository/Values/Content/VersionInfo.php:46
eZ\Publish\Core\Repository\Values\Content\VersionInfo\getNames
getNames()
{Return the human readable name in all provided languages.The structure of the return value is: arra...
Definition: Core/Repository/Values/Content/VersionInfo.php:59
eZ\Publish\Core\Repository\Values\Content
Definition: Publish/Core/Repository/Values/Content/Content.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.