PageTranslationVisibility extends BitSet

FinalYes

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.

Table of Contents

Properties

$set  : int

Methods

__construct()  : mixed
__toInt()  : int
Returns the integer representation of the internal set.
__toString()  : string
Returns the (binary) string representation of the internal (integer) set.
and()  : void
Performs a logical AND of this target bit set with the argument bit set. This bit set is modified so that each bit in it has the value true if and only if it both initially had the value true and the corresponding bit in the bit set argument also had the value true.
andNot()  : void
Clears all of the bits in this BitSet whose corresponding bit is set in the specified BitSet.
clear()  : void
Sets all of the bits in this BitSet to false.
get()  : bool
or()  : void
Performs a logical OR of this bit set with the bit set argument. This bit set is modified so that a bit in it has the value true if and only if it either already had the value true or the corresponding bit in the bit set argument has the value true.
set()  : void
Performs the same operation as {@see or()} without the need to create a BitSet instance from an integer value.
setValue()  : void
shouldBeHiddenInDefaultLanguage()  : bool
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).
shouldHideTranslationIfNoTranslatedRecordExists()  : bool
Response on input location setting value whether the page should be hidden if no translation exists.
unset()  : void
Performs the same operation as {@see andNot()} without the need to create a BitSet instance from an integer value.
xor()  : void
Performs a logical XOR of this bit set with the bit set argument. This bit set is modified so that a bit in it has the value true if and only if one of the following statements holds:

Properties

Methods

__construct()

public __construct([int $set = 0 ]) : mixed
Parameters
$set : int = 0

__toInt()

Returns the integer representation of the internal set.

public __toInt() : int

(As PHP does not know a byte type, the internal set is already handled as an integer and can therefore directly be returned)

Return values
int

__toString()

Returns the (binary) string representation of the internal (integer) set.

public __toString() : string
Return values
string

and()

Performs a logical AND of this target bit set with the argument bit set. This bit set is modified so that each bit in it has the value true if and only if it both initially had the value true and the corresponding bit in the bit set argument also had the value true.

public and(BitSet $set) : void
Parameters
$set : BitSet

andNot()

Clears all of the bits in this BitSet whose corresponding bit is set in the specified BitSet.

public andNot(BitSet $set) : void
Parameters
$set : BitSet

clear()

Sets all of the bits in this BitSet to false.

public clear() : void

get()

public get(int $bitIndex) : bool
Parameters
$bitIndex : int
Return values
bool

or()

Performs a logical OR of this bit set with the bit set argument. This bit set is modified so that a bit in it has the value true if and only if it either already had the value true or the corresponding bit in the bit set argument has the value true.

public or(BitSet $set) : void
Parameters
$set : BitSet

set()

Performs the same operation as {@see or()} without the need to create a BitSet instance from an integer value.

public set(int $bitIndex) : void
Parameters
$bitIndex : int

setValue()

public setValue(int $bitIndex, bool $value) : void
Parameters
$bitIndex : int
$value : bool

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).

public shouldBeHiddenInDefaultLanguage() : bool

This can be configured via pages.l18n_cfg=1 on a per-page basis.

Return values
bool

whether the page has the flag set

shouldHideTranslationIfNoTranslatedRecordExists()

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

public shouldHideTranslationIfNoTranslatedRecordExists() : bool

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.

Return values
bool

true if the page should be hidden

unset()

Performs the same operation as {@see andNot()} without the need to create a BitSet instance from an integer value.

public unset(int $bitIndex) : void
Parameters
$bitIndex : int

xor()

Performs a logical XOR of this bit set with the bit set argument. This bit set is modified so that a bit in it has the value true if and only if one of the following statements holds:

public xor(BitSet $set) : void
  • The bit initially has the value true, and the corresponding bit in the argument has the value false.
  • The bit initially has the value false, and the corresponding bit in the argument has the value true.
Parameters
$set : BitSet

        
On this page

Search results