‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Type\Bitmask\PageTranslationVisibility Class Reference
Inheritance diagram for TYPO3\CMS\Core\Type\Bitmask\PageTranslationVisibility:

Public Member Functions

bool shouldBeHiddenInDefaultLanguage ()
bool shouldHideTranslationIfNoTranslatedRecordExists ()
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Type\BitSet
 __construct (int $set=0)
 set (int $bitIndex)
 setValue (int $bitIndex, bool $value)
 unset (int $bitIndex)
 get (int $bitIndex)
 clear ()
 and (BitSet $set)
 or (BitSet $set)
 xor (BitSet $set)
 andNot (BitSet $set)
 __toInt ()
 __toString ()

Private Attributes


Additional Inherited Members

- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Type\BitSet
int $set

Detailed Description

A class providing constants for bitwise operations on page translation handling from $GLOBALS[TYPO3_CONF_VARS][FE][hidePagesIfNotTranslatedByDefault] and pages.l18n_cfg

Side note: The DB field pages.l18n_cfg (bitmask) has l10n_mode=exclude meaning that it can only be set on the default language and is automatically mirrored to all translated pages.

Definition at line 29 of file PageTranslationVisibility.php.

Member Function Documentation

◆ shouldBeHiddenInDefaultLanguage()

bool TYPO3\CMS\Core\Type\Bitmask\PageTranslationVisibility::shouldBeHiddenInDefaultLanguage ( )

Due to the nature of the pages table, where you always have to have a page in the default language, sometimes a page should be hidden in the default language (e.g. english), but only visible in the created and available language=6 (e.g. polish). This can be configured via pages.l18n_cfg=1 on a per-page basis.

‪bool whether the page has the flag set

Definition at line 42 of file PageTranslationVisibility.php.

References TYPO3\CMS\Core\Type\Bitmask\PageTranslationVisibility\HIDE_DEFAULT_LANGUAGE.

◆ shouldHideTranslationIfNoTranslatedRecordExists()

bool TYPO3\CMS\Core\Type\Bitmask\PageTranslationVisibility::shouldHideTranslationIfNoTranslatedRecordExists ( )

Response on input location setting value whether the page should be hidden if no translation exists.

Imagine this:

  • ‪You link to page 23 in language=5 (e.g. italian)
  • ‪The page was never translated to language=5 (no pages record with sys_language_uid=5 created) => Should the fallback kick in or not?

The answer depends on your use-case (e.g. fallback of italian to english etc) and can be tuned via the global configuration option and the pages.l18n_cfg=2 flag.

‪bool true if the page should be hidden

Definition at line 61 of file PageTranslationVisibility.php.

References $GLOBALS, and TYPO3\CMS\Core\Type\BitSet\xor().

Member Data Documentation


const TYPO3\CMS\Core\Type\Bitmask\PageTranslationVisibility::HIDE_DEFAULT_LANGUAGE = 1


const TYPO3\CMS\Core\Type\Bitmask\PageTranslationVisibility::HIDE_TRANSLATION_IF_NO_TRANSLATED_RECORD_EXISTS = 2

Definition at line 32 of file PageTranslationVisibility.php.