CoolCMS API

Parameter extends BaseEntity
in package
implements ParameterInterface, TreeNodeInterface, IdentifiableInterface uses IdentifiableTrait, TranslationCollectionTrait

AbstractYes
Tags
template
Attributes
#[MappedSuperclass]
#[TableAlias]
$alias: 'parameter'

Table of Contents

Interfaces

ParameterInterface
TreeNodeInterface
Marker for an entity ordered as a nested set (tree via lft/rgt/level + parentId).
IdentifiableInterface
Entity with a simple integer primary key. Most entities have one (often via {@see \App\Core\Traits\Shared\Models\Entities\IdentifiableTrait}); texts and links with a composite key do not, which is why `getId()` is not on {@see \App\Core\Base\BaseEntity}. Code that needs the id of a generic entity asks for this interface (parameter type, template bound, `instanceof`).

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, TTranslation>
$type  : int|null
$useEditor  : bool
$visibleOptionsCount  : int|null

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
getParameterGroupId()  : int|null
getParent()  : TParent|null
getParentId()  : int|null
getRequired()  : bool
getRgt()  : int
getSearchDefault()  : bool
getSearchDefaultOptionId()  : int|null
getSearchDefaultValue()  : string|null
getSearchType()  : int|null
getSubstitution()  : bool
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
setParameterGroupId()  : $this
setParent()  : $this
setParentId()  : $this
setRequired()  : $this
setRgt()  : $this
setSearchDefault()  : $this
setSearchDefaultOptionId()  : $this
setSearchDefaultValue()  : $this
setSearchType()  : $this
setSubstitution()  : $this
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_eshop_parameter_groups_parameter_group_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$parent

protected TParent|null $parent = null

$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, TTranslation> $translations = new ArrayCollection()

$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]

Methods

__construct()

public __construct([mixed $parent = null ][, int|null $id = null ][, string|null $key = null ][, int|null $type = null ][, int|null $searchType = null ][, int|null $defaultOptionId = null ][, string|null $defaultValue = null ][, int|null $parentId = null ][, int|null $parameterGroupId = null ][, int $level = 1 ][, int $lft = 0 ][, int $rgt = 0 ][, bool $hasOptions = false ][, bool $required = false ][, int|null $imageId = null ][, bool $substitution = false ][, int $number = 1 ][, bool $alwaysVisible = true ][, int|null $visibleOptionsCount = null ][, string|null $fileType = null ][, int|null $maxSize = null ][, int|null $maxLength = null ][, bool $default = true ][, ContentFilterMode $disallowUrl = ContentFilterMode::Off ][, ContentFilterMode $disallowBlacklistedWords = ContentFilterMode::Off ][, bool $alwaysRegenerate = false ][, bool $active = true ][, bool $throwErrorOnBlacklistedWord = false ][, bool $throwErrorOnUrl = false ][, bool $useEditor = false ][, string|null $searchDefaultValue = null ][, int|null $searchDefaultOptionId = null ][, bool $searchDefault = false ][, bool $filterMatchAll = false ][, Collection $translations = new ArrayCollection() ]) : mixed
Parameters
$parent : mixed = null
$id : int|null = null
$key : string|null = null
$type : int|null = null
$searchType : int|null = null
$defaultOptionId : int|null = null
$defaultValue : string|null = null
$parentId : int|null = null
$parameterGroupId : int|null = null
$level : int = 1
$lft : int = 0
$rgt : int = 0
$hasOptions : bool = false
$required : bool = false
$imageId : int|null = null
$substitution : bool = false
$number : int = 1
$alwaysVisible : bool = true
$visibleOptionsCount : int|null = null
$fileType : string|null = null
$maxSize : int|null = null
$maxLength : int|null = null
$default : bool = true
$disallowUrl : ContentFilterMode = ContentFilterMode::Off
$disallowBlacklistedWords : ContentFilterMode = ContentFilterMode::Off
$alwaysRegenerate : bool = false
$active : bool = true
$throwErrorOnBlacklistedWord : bool = false
$throwErrorOnUrl : bool = false
$useEditor : bool = false
$searchDefaultValue : string|null = null
$searchDefaultOptionId : int|null = null
$searchDefault : bool = false
$filterMatchAll : bool = false
$translations : Collection = new ArrayCollection()

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

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

getSubstitution()

public getSubstitution() : bool
Return values
bool

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 $parent) : $this
Parameters
$parent : TParent
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