HighlightText
extends HighlightText
in package
Translation of a highlight: label and value (for example "Years of experience" / "10+").
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_company_highlight_texts'
- #[TableAlias]
- 'highlightText'
Table of Contents
Properties
- $activeTranslation : bool
- $label : string|null
- $languageId : int|null
- $parent : mixed
- $value : string|null
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getActiveTranslation() : bool
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getLabel() : string|null
- getLanguageId() : int|null
- Translation language; null only for a new entity before `setLanguageId()`.
- getParent() : object|null
- getValue() : string|null
- isActiveTranslation() : bool
- setActiveTranslation() : $this
- setLabel() : $this
- setLanguageId() : $this
- setParent() : static
- setValue() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$activeTranslation
protected
bool
$activeTranslation
= true
Attributes
- #[Column]
- $name: 'active_translation'
- $type: 'boolean'
$label
protected
string|null
$label
= null
Attributes
- #[Column]
- $name: 'label'
- $type: 'string'
- $length: 255
- $nullable: true
$languageId
protected
int|null
$languageId
= null
Attributes
- #[Column]
- $name: 'cms_system_languages_language_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[Id]
- #[Identity]
$parent
protected
mixed
$parent
= null
Attributes
- #[EntityOf]
- \App\UI\Front\Company\Models\Entities\Highlight::class
- #[Id]
- #[Identity]
- #[JoinColumn]
- $name: 'cms_mod_company_highlights_highlight_id'
- $referencedColumnName: 'highlight_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Front\Company\Models\Entities\Highlight::class
- $inversedBy: 'translations'
$value
protected
string|null
$value
= null
Attributes
- #[Column]
- $name: 'value'
- $type: 'string'
- $length: 100
- $nullable: true
Methods
__construct()
public
__construct([int|null $languageId = null ][, string|null $label = null ][, string|null $value = null ][, bool $activeTranslation = true ]) : mixed
Parameters
- $languageId : int|null = null
- $label : string|null = null
- $value : string|null = null
- $activeTranslation : bool = true
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getActiveTranslation()
public
getActiveTranslation() : bool
Return values
boolgetAllTraits()
Returns all traits the class uses, including those used by parent classes and nested traits.
public
getAllTraits() : array<string, string>
Return values
array<string, string>getLabel()
public
getLabel() : string|null
Return values
string|nullgetLanguageId()
Translation language; null only for a new entity before `setLanguageId()`.
public
getLanguageId() : int|null
Return values
int|nullgetParent()
public
getParent() : object|null
Return values
object|nullgetValue()
public
getValue() : string|null
Return values
string|nullisActiveTranslation()
public
isActiveTranslation() : bool
Return values
boolsetActiveTranslation()
public
setActiveTranslation(bool $activeTranslation) : $this
Parameters
- $activeTranslation : bool
Return values
$thissetLabel()
public
setLabel(string|null $label) : $this
Parameters
- $label : string|null
Return values
$thissetLanguageId()
public
setLanguageId(int $languageId) : $this
Parameters
- $languageId : int
Return values
$thissetParent()
public
setParent(object|null $parent) : static
Parameters
- $parent : object|null
Return values
staticsetValue()
public
setValue(string|null $value) : $this
Parameters
- $value : string|null
Return values
$thisgetTraitsRecursive()
Walks the trait list recursively and collects nested traits too.
private
static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
- $traits : array<string, string>