LocalisedText
in package
uses
IdentifiableTrait
AbstractYes
Class LocalisedText: stores Dutch and English versions of text fields.
Tags
Table of Contents
Properties
- $id : int|null
- The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
- $valueEN : string|null
- $valueNL : string|null
Methods
- __construct() : mixed
- getExactText() : string|null
- getId() : int|null
- Get the identifier of the object.
- getText() : string|null
- getValueEN() : string|null
- getValueNL() : string|null
- setId() : void
- Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
- toGdprArray() : LocalisedTextGdprArrayType
- updateValueEN() : void
- updateValueNL() : void
- updateValues() : void
- getPreferredLocale() : string
Properties
$id
The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
protected
int|null
$id
= null
Attributes
- #[Column]
- $type: 'integer'
- #[GeneratedValue]
- $strategy: 'IDENTITY'
- #[Id]
$valueEN
protected
string|null
$valueEN
= null
Attributes
- #[Column]
- $type: 'text'
- $nullable: true
$valueNL
protected
string|null
$valueNL
= null
Attributes
- #[Column]
- $type: 'text'
- $nullable: true
Methods
__construct()
public
__construct([string|null $valueEN = null ][, string|null $valueNL = null ]) : mixed
Parameters
- $valueEN : string|null = null
- $valueNL : string|null = null
getExactText()
public
getExactText([Languages|null $locale = null ]) : string|null
Parameters
- $locale : Languages|null = null
Tags
Return values
string|null —the localised text
getId()
Get the identifier of the object.
public
getId() : int|null
Tags
Return values
int|nullgetText()
public
getText([string|null $locale = null ]) : string|null
Parameters
- $locale : string|null = null
Tags
Return values
string|null —the localised text or null when there is no localised text
getValueEN()
public
getValueEN() : string|null
Return values
string|nullgetValueNL()
public
getValueNL() : string|null
Return values
string|nullsetId()
Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
public
setId(int|null $id) : void
Parameters
- $id : int|null
toGdprArray()
public
toGdprArray() : LocalisedTextGdprArrayType
Return values
LocalisedTextGdprArrayTypeupdateValueEN()
public
updateValueEN(string|null $valueEN) : void
Parameters
- $valueEN : string|null
updateValueNL()
public
updateValueNL(string|null $valueNL) : void
Parameters
- $valueNL : string|null
updateValues()
public
updateValues(string|null $valueEN, string|null $valueNL) : void
Parameters
- $valueEN : string|null
- $valueNL : string|null
getPreferredLocale()
private
getPreferredLocale() : string
Return values
string —the preferred language: either 'nl' or 'en'