*/
/**
- * Entity representing a sys_sitelanguage configuration of a site object.
+ * Entity representing a site_language configuration of a site object.
*/
class SiteLanguage
{
- /**
- * @var Site
- */
- protected $site;
-
/**
* The language mapped to the sys_language DB entry.
*
/**
* SiteLanguage constructor.
- * @param Site $site
* @param int $languageId
* @param string $locale
* @param string $base
* @param array $attributes
*/
- public function __construct(Site $site, int $languageId, string $locale, string $base, array $attributes)
+ public function __construct(int $languageId, string $locale, string $base, array $attributes)
{
- $this->site = $site;
$this->languageId = $languageId;
$this->locale = $locale;
$this->base = $base;
];
}
- /**
- * @return Site
- */
- public function getSite(): Site
- {
- return $this->site;
- }
-
/**
* @return int
*/
*/
public function getNavigationTitle(): string
{
- return $this->navigationTitle ?? $this->getTitle();
+ return $this->navigationTitle ?: $this->getTitle();
}
/**
return $this->typo3Language;
}
- /**
- * @return string
- */
- public function getFallbackType(): string
- {
- return $this->fallbackType;
- }
-
/**
* Returns the ISO-639-1 language ISO code
*
*/
public function getTwoLetterIsoCode(): string
{
- return $this->twoLetterIsoCode ?? '';
+ return $this->twoLetterIsoCode;
}
/**
*/
public function getHreflang(): string
{
- return $this->hreflang ?? '';
+ return $this->hreflang;
}
/**
*/
public function getDirection(): string
{
- return $this->direction ?? '';
+ return $this->direction;
+ }
+
+ /**
+ * @return string
+ */
+ public function getFallbackType(): string
+ {
+ return $this->fallbackType;
}
/**