CoolCMS API

Parameter extends Parameter
in package

Admin variant of a company parameter, hydrated from `api/comcat/parameter`.

Besides the translations it maps the options (child parameters that are the choices of a select; without them the select field in the profile form has no data) and the rules (source and target rules that drive show and hide in the ParameterForm engine). Mirrors the Front Parameter.

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_comcat_parameters'
#[TableAlias]
'parameter'

Table of Contents

Properties

$active  : bool
$alwaysRegenerate  : bool
$alwaysVisible  : bool
$default  : bool
$defaultOptionId  : int|null
$defaultValue  : string|null
$disallowBlacklistedWords  : ContentFilterMode
$disallowUrl  : ContentFilterMode
$fileType  : string|null
$filterMatchAll  : bool
$hasOptions  : bool
$id  : int|null
$imageId  : int|null
$key  : string|null
$level  : int
$lft  : int
$maxLength  : int|null
Max. number of characters of the value (visible text with the editor); null = no limit.
$maxSize  : int|null
$number  : int
$parameterGroupId  : int|null
$parent  : TParent|null
$parentId  : int|null
$required  : bool
$rgt  : int
$searchDefault  : bool
$searchDefaultOptionId  : int|null
$searchDefaultValue  : string|null
$searchType  : int|null
$substitution  : bool
$throwErrorOnBlacklistedWord  : bool
$throwErrorOnUrl  : bool
$translations  : Collection<int, ParameterText>
$type  : int|null
$useEditor  : bool
$visibleOptionsCount  : int|null
$optionsCollection  : Collection<int, Parameter>
$sourceRulesCollection  : Collection<int, ParameterRuleSource>
$targetRulesCollection  : Collection<int, ParameterRuleTarget>

Methods

__construct()  : mixed
addTranslation()  : $this
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getActive()  : bool
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getAlwaysRegenerate()  : bool
getAlwaysVisible()  : bool
getDefault()  : bool
getDefaultOptionId()  : int|null
getDefaultValue()  : string|null
getDisallowBlacklistedWords()  : ContentFilterMode
getDisallowUrl()  : ContentFilterMode
getFileType()  : string|null
getFilterMatchAll()  : bool
Within-facet matching: true requires the set to have all selected values (N filters), false matches any of them (`IN`).
getHasOptions()  : bool
getId()  : int|null
getImageId()  : int|null
getKey()  : string|null
getLevel()  : int
getLft()  : int
getMaxLength()  : int|null
Max. number of characters of the value (visible text with the editor); null = no limit.
getMaxSize()  : int|null
getNumber()  : int
getOptions()  : array<int, object>
getOptionsCollection()  : Collection<int, Parameter>
getParameterGroupId()  : int|null
getParent()  : TParent|null
getParentId()  : int|null
getRequired()  : bool
getRgt()  : int
getSearchDefault()  : bool
getSearchDefaultOptionId()  : int|null
getSearchDefaultValue()  : string|null
getSearchType()  : int|null
getSourceRules()  : array<int, object>
getSourceRulesCollection()  : Collection<int, ParameterRuleSource>
getSubstitution()  : bool
getTargetRules()  : array<int, object>
getTargetRulesCollection()  : Collection<int, ParameterRuleTarget>
getThrowErrorOnBlacklistedWord()  : bool
getThrowErrorOnUrl()  : bool
getTranslation()  : TTranslation|null
getTranslations()  : Collection<int, TTranslation>
getType()  : int|null
getUseEditor()  : bool
getVisibleOptionsCount()  : int|null
isActive()  : bool
isAlwaysRegenerate()  : bool
isAlwaysVisible()  : bool
isDefault()  : bool
isFilterMatchAll()  : bool
isHasOptions()  : bool
isPersisted()  : bool
isRequired()  : bool
isSearchDefault()  : bool
isSubstitution()  : bool
isThrowErrorOnBlacklistedWord()  : bool
isThrowErrorOnUrl()  : bool
isUseEditor()  : bool
removeTranslation()  : $this
setActive()  : $this
setAlwaysRegenerate()  : $this
setAlwaysVisible()  : $this
setDefault()  : $this
setDefaultOptionId()  : $this
setDefaultValue()  : $this
setDisallowBlacklistedWords()  : $this
setDisallowUrl()  : $this
setFileType()  : $this
setFilterMatchAll()  : $this
setHasOptions()  : $this
setId()  : $this
setImageId()  : $this
setKey()  : $this
setLevel()  : $this
setLft()  : $this
setMaxLength()  : self
setMaxSize()  : $this
setNumber()  : $this
setOptionsCollection()  : self
setParameterGroupId()  : $this
setParent()  : $this
setParentId()  : $this
setRequired()  : $this
setRgt()  : $this
setSearchDefault()  : $this
setSearchDefaultOptionId()  : $this
setSearchDefaultValue()  : $this
setSearchType()  : $this
setSourceRulesCollection()  : self
setSubstitution()  : $this
setTargetRulesCollection()  : self
setThrowErrorOnBlacklistedWord()  : $this
setThrowErrorOnUrl()  : $this
setTranslations()  : $this
setType()  : $this
setUseEditor()  : $this
setVisibleOptionsCount()  : $this
translationCollectionInit()  : void
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$active

protected bool $active = true
Attributes
#[Column]
$name: 'active'
$type: 'boolean'

$alwaysRegenerate

protected bool $alwaysRegenerate = false
Attributes
#[Column]
$name: 'always_regenerate'
$type: 'boolean'

$alwaysVisible

protected bool $alwaysVisible = true
Attributes
#[Column]
$name: 'always_visible'
$type: 'boolean'

$default

protected bool $default = true
Attributes
#[Column]
$name: '`default`'
$type: 'boolean'

$defaultOptionId

protected int|null $defaultOptionId = null
Attributes
#[Column]
$name: 'default_option_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$defaultValue

protected string|null $defaultValue = null
Attributes
#[Column]
$name: 'default_value'
$type: 'string'
$length: 255
$nullable: true

$disallowBlacklistedWords

protected ContentFilterMode $disallowBlacklistedWords = ContentFilterMode::Off
Attributes
#[Column]
$name: 'disallow_blacklisted_words'
$type: 'smallint'
$enumType: ContentFilterMode::class

$disallowUrl

protected ContentFilterMode $disallowUrl = ContentFilterMode::Off
Attributes
#[Column]
$name: 'disallow_url'
$type: 'smallint'
$enumType: ContentFilterMode::class

$fileType

protected string|null $fileType = null
Attributes
#[Column]
$name: 'file_type'
$type: 'text'
$nullable: true

$filterMatchAll

protected bool $filterMatchAll = false
Attributes
#[Column]
$name: 'filter_match_all'
$type: 'boolean'

$hasOptions

protected bool $hasOptions = false
Attributes
#[Column]
$name: 'has_options'
$type: 'boolean'

$id

protected int|null $id = null
Attributes
#[Column]
$name: 'parameter_id'
$type: 'integer'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$imageId

protected int|null $imageId = null
Attributes
#[Column]
$name: 'cms_system_images_image_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$key

protected string|null $key = null
Attributes
#[Column]
$name: '`key`'
$type: 'string'
$length: 45
$nullable: true
$unique: true

$level

protected int $level = 1
Attributes
#[Column]
$name: 'level'
$type: 'integer'
$options: ['unsigned' => true]

$lft

protected int $lft = 0
Attributes
#[Column]
$name: 'lft'
$type: 'integer'
$options: ['unsigned' => true]

$maxLength

Max. number of characters of the value (visible text with the editor); null = no limit.

protected int|null $maxLength = null
Attributes
#[Column]
$name: 'max_length'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$maxSize

protected int|null $maxSize = null
Attributes
#[Column]
$name: 'max_size'
$type: 'integer'
$nullable: true

$number

protected int $number = 1
Attributes
#[Column]
$name: 'number'
$type: 'smallint'
$options: ['unsigned' => true]

$parameterGroupId

protected int|null $parameterGroupId = null
Attributes
#[Column]
$name: 'cms_mod_comcat_parameter_groups_parameter_group_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$parent

protected TParent|null $parent = null
Attributes
#[EntityOf]
\App\UI\Admin\Comcat\Models\Entities\Parameter::class
#[JoinColumn]
$name: 'parent_id'
$referencedColumnName: 'parameter_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Comcat\Models\Entities\Parameter::class

$parentId

protected int|null $parentId = null
Attributes
#[Column]
$name: 'parent_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$required

protected bool $required = false
Attributes
#[Column]
$name: 'required'
$type: 'boolean'

$rgt

protected int $rgt = 0
Attributes
#[Column]
$name: 'rgt'
$type: 'integer'
$options: ['unsigned' => true]

$searchDefault

protected bool $searchDefault = false
Attributes
#[Column]
$name: 'search_default'
$type: 'boolean'

$searchDefaultOptionId

protected int|null $searchDefaultOptionId = null
Attributes
#[Column]
$name: 'search_default_option_id'
$type: 'integer'
$nullable: true

$searchDefaultValue

protected string|null $searchDefaultValue = null
Attributes
#[Column]
$name: 'search_default_value'
$type: 'string'
$length: 255
$nullable: true

$searchType

protected int|null $searchType = null
Attributes
#[Column]
$name: 'search_type'
$type: 'smallint'
$nullable: true

$substitution

protected bool $substitution = false
Attributes
#[Column]
$name: 'substitution'
$type: 'boolean'

$throwErrorOnBlacklistedWord

protected bool $throwErrorOnBlacklistedWord = false
Attributes
#[Column]
$name: 'throw_error_on_blacklisted_word'
$type: 'boolean'

$throwErrorOnUrl

protected bool $throwErrorOnUrl = false
Attributes
#[Column]
$name: 'throw_error_on_url'
$type: 'boolean'

$translations

protected Collection<int, ParameterText> $translations
Attributes
#[CollectionOf]
\App\UI\Admin\Comcat\Models\Entities\ParameterText::class
$owned: true
#[OneToMany]
$targetEntity: \App\UI\Admin\Comcat\Models\Entities\ParameterText::class
$mappedBy: 'parent'
$cascade: ["persist", "remove"]
$orphanRemoval: true
$fetch: "LAZY"

$type

protected int|null $type = null
Attributes
#[Column]
$name: 'type'
$type: 'smallint'
$nullable: true

$useEditor

protected bool $useEditor = false
Attributes
#[Column]
$name: 'use_editor'
$type: 'boolean'

$visibleOptionsCount

protected int|null $visibleOptionsCount = null
Attributes
#[Column]
$name: 'visible_options_count'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]
#[ExternalReadonly]

$optionsCollection

private Collection<int, Parameter> $optionsCollection
Attributes
#[CollectionOf]
\App\UI\Admin\Comcat\Models\Entities\Parameter::class
#[OneToMany]
$targetEntity: \App\UI\Admin\Comcat\Models\Entities\Parameter::class
$mappedBy: 'parent'
$fetch: "LAZY"

$sourceRulesCollection

private Collection<int, ParameterRuleSource> $sourceRulesCollection
Attributes
#[CollectionOf]
\App\UI\Admin\Comcat\Models\Entities\ParameterRuleSource::class
#[OneToMany]
$targetEntity: \App\UI\Admin\Comcat\Models\Entities\ParameterRuleSource::class
$mappedBy: 'parameter'
$fetch: "LAZY"

$targetRulesCollection

private Collection<int, ParameterRuleTarget> $targetRulesCollection
Attributes
#[CollectionOf]
\App\UI\Admin\Comcat\Models\Entities\ParameterRuleTarget::class
#[OneToMany]
$targetEntity: \App\UI\Admin\Comcat\Models\Entities\ParameterRuleTarget::class
$mappedBy: 'parameter'
$fetch: "LAZY"

Methods

addTranslation()

public addTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

callInitMethods()

Calls `init{TraitName}()` for every used trait that defines such a method.

public callInitMethods() : void

getActive()

public getActive() : bool
Return values
bool

getAllTraits()

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>

getAlwaysRegenerate()

public getAlwaysRegenerate() : bool
Return values
bool

getAlwaysVisible()

public getAlwaysVisible() : bool
Return values
bool

getDefault()

public getDefault() : bool
Return values
bool

getDefaultOptionId()

public getDefaultOptionId() : int|null
Return values
int|null

getDefaultValue()

public getDefaultValue() : string|null
Return values
string|null

getFileType()

public getFileType() : string|null
Return values
string|null

getFilterMatchAll()

Within-facet matching: true requires the set to have all selected values (N filters), false matches any of them (`IN`).

public getFilterMatchAll() : bool
Return values
bool

getHasOptions()

public getHasOptions() : bool
Return values
bool

getImageId()

public getImageId() : int|null
Return values
int|null

getKey()

public getKey() : string|null
Return values
string|null

getLevel()

public getLevel() : int
Return values
int

getLft()

public getLft() : int
Return values
int

getMaxLength()

Max. number of characters of the value (visible text with the editor); null = no limit.

public getMaxLength() : int|null
Return values
int|null

getMaxSize()

public getMaxSize() : int|null
Return values
int|null

getNumber()

public getNumber() : int
Return values
int

getOptions()

public getOptions() : array<int, object>
Return values
array<int, object>

getParameterGroupId()

public getParameterGroupId() : int|null
Return values
int|null

getParent()

public getParent() : TParent|null
Return values
TParent|null

getParentId()

public getParentId() : int|null
Return values
int|null

getRequired()

public getRequired() : bool
Return values
bool

getRgt()

public getRgt() : int
Return values
int

getSearchDefault()

public getSearchDefault() : bool
Return values
bool

getSearchDefaultOptionId()

public getSearchDefaultOptionId() : int|null
Return values
int|null

getSearchDefaultValue()

public getSearchDefaultValue() : string|null
Return values
string|null

getSearchType()

public getSearchType() : int|null
Return values
int|null

getSourceRules()

public getSourceRules() : array<int, object>
Return values
array<int, object>

getSubstitution()

public getSubstitution() : bool
Return values
bool

getTargetRules()

public getTargetRules() : array<int, object>
Return values
array<int, object>

getThrowErrorOnBlacklistedWord()

public getThrowErrorOnBlacklistedWord() : bool
Return values
bool

getThrowErrorOnUrl()

public getThrowErrorOnUrl() : bool
Return values
bool

getTranslation()

public getTranslation(int $langId) : TTranslation|null
Parameters
$langId : int
Return values
TTranslation|null

getTranslations()

public getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>

getType()

public getType() : int|null
Return values
int|null

getUseEditor()

public getUseEditor() : bool
Return values
bool

getVisibleOptionsCount()

public getVisibleOptionsCount() : int|null
Return values
int|null

isActive()

public isActive() : bool
Return values
bool

isAlwaysRegenerate()

public isAlwaysRegenerate() : bool
Return values
bool

isAlwaysVisible()

public isAlwaysVisible() : bool
Return values
bool

isDefault()

public isDefault() : bool
Return values
bool

isFilterMatchAll()

public isFilterMatchAll() : bool
Return values
bool

isHasOptions()

public isHasOptions() : bool
Return values
bool

isRequired()

public isRequired() : bool
Return values
bool

isSearchDefault()

public isSearchDefault() : bool
Return values
bool

isSubstitution()

public isSubstitution() : bool
Return values
bool

isThrowErrorOnBlacklistedWord()

public isThrowErrorOnBlacklistedWord() : bool
Return values
bool

isThrowErrorOnUrl()

public isThrowErrorOnUrl() : bool
Return values
bool

isUseEditor()

public isUseEditor() : bool
Return values
bool

removeTranslation()

public removeTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

setActive()

public setActive(bool $active) : $this
Parameters
$active : bool
Return values
$this

setAlwaysRegenerate()

public setAlwaysRegenerate(bool $alwaysRegenerate) : $this
Parameters
$alwaysRegenerate : bool
Return values
$this

setAlwaysVisible()

public setAlwaysVisible(bool $alwaysVisible) : $this
Parameters
$alwaysVisible : bool
Return values
$this

setDefault()

public setDefault(bool $default) : $this
Parameters
$default : bool
Return values
$this

setDefaultOptionId()

public setDefaultOptionId(int|null $defaultOptionId) : $this
Parameters
$defaultOptionId : int|null
Return values
$this

setDefaultValue()

public setDefaultValue(string|null $defaultValue) : $this
Parameters
$defaultValue : string|null
Return values
$this

setFileType()

public setFileType(string|null $fileType) : $this
Parameters
$fileType : string|null
Return values
$this

setFilterMatchAll()

public setFilterMatchAll(bool $filterMatchAll) : $this
Parameters
$filterMatchAll : bool
Return values
$this

setHasOptions()

public setHasOptions(bool $hasOptions) : $this
Parameters
$hasOptions : bool
Return values
$this

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
Return values
$this

setImageId()

public setImageId(int|null $imageId) : $this
Parameters
$imageId : int|null
Return values
$this

setKey()

public setKey(string|null $key) : $this
Parameters
$key : string|null
Return values
$this

setLevel()

public setLevel(int $level) : $this
Parameters
$level : int
Return values
$this

setLft()

public setLft(int $lft) : $this
Parameters
$lft : int
Return values
$this

setMaxLength()

public setMaxLength(int|null $maxLength) : self
Parameters
$maxLength : int|null
Return values
self

setMaxSize()

public setMaxSize(int|null $maxSize) : $this
Parameters
$maxSize : int|null
Return values
$this

setNumber()

public setNumber(int $number) : $this
Parameters
$number : int
Return values
$this

setParameterGroupId()

public setParameterGroupId(int|null $parameterGroupId) : $this
Parameters
$parameterGroupId : int|null
Return values
$this

setParent()

public setParent(TParent|null $parent) : $this
Parameters
$parent : TParent|null
Return values
$this

setParentId()

public setParentId(int|null $parentId) : $this
Parameters
$parentId : int|null
Return values
$this

setRequired()

public setRequired(bool $required) : $this
Parameters
$required : bool
Return values
$this

setRgt()

public setRgt(int $rgt) : $this
Parameters
$rgt : int
Return values
$this

setSearchDefault()

public setSearchDefault(bool $searchDefault) : $this
Parameters
$searchDefault : bool
Return values
$this

setSearchDefaultOptionId()

public setSearchDefaultOptionId(int|null $searchDefaultOptionId) : $this
Parameters
$searchDefaultOptionId : int|null
Return values
$this

setSearchDefaultValue()

public setSearchDefaultValue(string|null $searchDefaultValue) : $this
Parameters
$searchDefaultValue : string|null
Return values
$this

setSearchType()

public setSearchType(int|null $searchType) : $this
Parameters
$searchType : int|null
Return values
$this

setSubstitution()

public setSubstitution(bool $substitution) : $this
Parameters
$substitution : bool
Return values
$this

setThrowErrorOnBlacklistedWord()

public setThrowErrorOnBlacklistedWord(bool $throwErrorOnBlacklistedWord) : $this
Parameters
$throwErrorOnBlacklistedWord : bool
Return values
$this

setThrowErrorOnUrl()

public setThrowErrorOnUrl(bool $throwErrorOnUrl) : $this
Parameters
$throwErrorOnUrl : bool
Return values
$this

setTranslations()

public setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
$translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$this

setType()

public setType(int|null $type) : $this
Parameters
$type : int|null
Return values
$this

setUseEditor()

public setUseEditor(bool $useEditor) : $this
Parameters
$useEditor : bool
Return values
$this

setVisibleOptionsCount()

public setVisibleOptionsCount(int|null $visibleOptionsCount) : $this
Parameters
$visibleOptionsCount : int|null
Return values
$this

getTraitsRecursive()

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>
Return values
array<string, string>
On this page

Search results