Parameter
extends Parameter
in package
Admin variant of the e-shop parameter (`cms_mod_eshop_parameters`), hydrated from `api/eshop/parameter`.
Besides translations (grid) it maps the options (child parameters, the choices of select
parameters; without them a select field has no data) and the rules (source and target
rules driving show/hide in the parameter form engine). Mirrors the front end Parameter.
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_eshop_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_eshop_parameter_groups_parameter_group_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$parent
protected
TParent|null
$parent
= null
Attributes
- #[EntityOf]
- \App\UI\Admin\Eshop\Models\Entities\Parameter::class
- #[JoinColumn]
- $name: 'parent_id'
- $referencedColumnName: 'parameter_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Admin\Eshop\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\Eshop\Models\Entities\ParameterText::class
- $owned: true
- #[OneToMany]
- $targetEntity: \App\UI\Admin\Eshop\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]
$optionsCollection
private
Collection<int, Parameter>
$optionsCollection
Attributes
- #[CollectionOf]
- \App\UI\Admin\Eshop\Models\Entities\Parameter::class
- #[OneToMany]
- $targetEntity: \App\UI\Admin\Eshop\Models\Entities\Parameter::class
- $mappedBy: 'parent'
- $fetch: "LAZY"
$sourceRulesCollection
private
Collection<int, ParameterRuleSource>
$sourceRulesCollection
Attributes
- #[CollectionOf]
- \App\UI\Admin\Eshop\Models\Entities\ParameterRuleSource::class
- #[OneToMany]
- $targetEntity: \App\UI\Admin\Eshop\Models\Entities\ParameterRuleSource::class
- $mappedBy: 'parameter'
- $fetch: "LAZY"
$targetRulesCollection
private
Collection<int, ParameterRuleTarget>
$targetRulesCollection
Attributes
- #[CollectionOf]
- \App\UI\Admin\Eshop\Models\Entities\ParameterRuleTarget::class
- #[OneToMany]
- $targetEntity: \App\UI\Admin\Eshop\Models\Entities\ParameterRuleTarget::class
- $mappedBy: 'parameter'
- $fetch: "LAZY"
Methods
__construct()
public
__construct() : mixed
addTranslation()
public
addTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thiscallInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getActive()
public
getActive() : 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>getAlwaysRegenerate()
public
getAlwaysRegenerate() : bool
Return values
boolgetAlwaysVisible()
public
getAlwaysVisible() : bool
Return values
boolgetDefault()
public
getDefault() : bool
Return values
boolgetDefaultOptionId()
public
getDefaultOptionId() : int|null
Return values
int|nullgetDefaultValue()
public
getDefaultValue() : string|null
Return values
string|nullgetDisallowBlacklistedWords()
public
getDisallowBlacklistedWords() : ContentFilterMode
Return values
ContentFilterModegetDisallowUrl()
public
getDisallowUrl() : ContentFilterMode
Return values
ContentFilterModegetFileType()
public
getFileType() : string|null
Return values
string|nullgetFilterMatchAll()
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
boolgetHasOptions()
public
getHasOptions() : bool
Return values
boolgetId()
public
getId() : int|null
Return values
int|nullgetImageId()
public
getImageId() : int|null
Return values
int|nullgetKey()
public
getKey() : string|null
Return values
string|nullgetLevel()
public
getLevel() : int
Return values
intgetLft()
public
getLft() : int
Return values
intgetMaxLength()
Max. number of characters of the value (visible text with the editor); null = no limit.
public
getMaxLength() : int|null
Return values
int|nullgetMaxSize()
public
getMaxSize() : int|null
Return values
int|nullgetNumber()
public
getNumber() : int
Return values
intgetOptions()
public
getOptions() : array<int, object>
Return values
array<int, object>getOptionsCollection()
public
getOptionsCollection() : Collection<int, Parameter>
Return values
Collection<int, Parameter>getParameterGroupId()
public
getParameterGroupId() : int|null
Return values
int|nullgetParent()
public
getParent() : TParent|null
Return values
TParent|nullgetParentId()
public
getParentId() : int|null
Return values
int|nullgetRequired()
public
getRequired() : bool
Return values
boolgetRgt()
public
getRgt() : int
Return values
intgetSearchDefault()
public
getSearchDefault() : bool
Return values
boolgetSearchDefaultOptionId()
public
getSearchDefaultOptionId() : int|null
Return values
int|nullgetSearchDefaultValue()
public
getSearchDefaultValue() : string|null
Return values
string|nullgetSearchType()
public
getSearchType() : int|null
Return values
int|nullgetSourceRules()
public
getSourceRules() : array<int, object>
Return values
array<int, object>getSourceRulesCollection()
public
getSourceRulesCollection() : Collection<int, ParameterRuleSource>
Return values
Collection<int, ParameterRuleSource>getSubstitution()
public
getSubstitution() : bool
Return values
boolgetTargetRules()
public
getTargetRules() : array<int, object>
Return values
array<int, object>getTargetRulesCollection()
public
getTargetRulesCollection() : Collection<int, ParameterRuleTarget>
Return values
Collection<int, ParameterRuleTarget>getThrowErrorOnBlacklistedWord()
public
getThrowErrorOnBlacklistedWord() : bool
Return values
boolgetThrowErrorOnUrl()
public
getThrowErrorOnUrl() : bool
Return values
boolgetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>getType()
public
getType() : int|null
Return values
int|nullgetUseEditor()
public
getUseEditor() : bool
Return values
boolgetVisibleOptionsCount()
public
getVisibleOptionsCount() : int|null
Return values
int|nullisActive()
public
isActive() : bool
Return values
boolisAlwaysRegenerate()
public
isAlwaysRegenerate() : bool
Return values
boolisAlwaysVisible()
public
isAlwaysVisible() : bool
Return values
boolisDefault()
public
isDefault() : bool
Return values
boolisFilterMatchAll()
public
isFilterMatchAll() : bool
Return values
boolisHasOptions()
public
isHasOptions() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolisRequired()
public
isRequired() : bool
Return values
boolisSearchDefault()
public
isSearchDefault() : bool
Return values
boolisSubstitution()
public
isSubstitution() : bool
Return values
boolisThrowErrorOnBlacklistedWord()
public
isThrowErrorOnBlacklistedWord() : bool
Return values
boolisThrowErrorOnUrl()
public
isThrowErrorOnUrl() : bool
Return values
boolisUseEditor()
public
isUseEditor() : bool
Return values
boolremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetActive()
public
setActive(bool $active) : $this
Parameters
- $active : bool
Return values
$thissetAlwaysRegenerate()
public
setAlwaysRegenerate(bool $alwaysRegenerate) : $this
Parameters
- $alwaysRegenerate : bool
Return values
$thissetAlwaysVisible()
public
setAlwaysVisible(bool $alwaysVisible) : $this
Parameters
- $alwaysVisible : bool
Return values
$thissetDefault()
public
setDefault(bool $default) : $this
Parameters
- $default : bool
Return values
$thissetDefaultOptionId()
public
setDefaultOptionId(int|null $defaultOptionId) : $this
Parameters
- $defaultOptionId : int|null
Return values
$thissetDefaultValue()
public
setDefaultValue(string|null $defaultValue) : $this
Parameters
- $defaultValue : string|null
Return values
$thissetDisallowBlacklistedWords()
public
setDisallowBlacklistedWords(ContentFilterMode $disallowBlacklistedWords) : $this
Parameters
- $disallowBlacklistedWords : ContentFilterMode
Return values
$thissetDisallowUrl()
public
setDisallowUrl(ContentFilterMode $disallowUrl) : $this
Parameters
- $disallowUrl : ContentFilterMode
Return values
$thissetFileType()
public
setFileType(string|null $fileType) : $this
Parameters
- $fileType : string|null
Return values
$thissetFilterMatchAll()
public
setFilterMatchAll(bool $filterMatchAll) : $this
Parameters
- $filterMatchAll : bool
Return values
$thissetHasOptions()
public
setHasOptions(bool $hasOptions) : $this
Parameters
- $hasOptions : bool
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetImageId()
public
setImageId(int|null $imageId) : $this
Parameters
- $imageId : int|null
Return values
$thissetKey()
public
setKey(string|null $key) : $this
Parameters
- $key : string|null
Return values
$thissetLevel()
public
setLevel(int $level) : $this
Parameters
- $level : int
Return values
$thissetLft()
public
setLft(int $lft) : $this
Parameters
- $lft : int
Return values
$thissetMaxLength()
public
setMaxLength(int|null $maxLength) : self
Parameters
- $maxLength : int|null
Return values
selfsetMaxSize()
public
setMaxSize(int|null $maxSize) : $this
Parameters
- $maxSize : int|null
Return values
$thissetNumber()
public
setNumber(int $number) : $this
Parameters
- $number : int
Return values
$thissetOptionsCollection()
public
setOptionsCollection(Collection<int, Parameter>|array<int, Parameter> $collection) : self
Parameters
Return values
selfsetParameterGroupId()
public
setParameterGroupId(int|null $parameterGroupId) : $this
Parameters
- $parameterGroupId : int|null
Return values
$thissetParent()
public
setParent(TParent $parent) : $this
Parameters
- $parent : TParent
Return values
$thissetParentId()
public
setParentId(int|null $parentId) : $this
Parameters
- $parentId : int|null
Return values
$thissetRequired()
public
setRequired(bool $required) : $this
Parameters
- $required : bool
Return values
$thissetRgt()
public
setRgt(int $rgt) : $this
Parameters
- $rgt : int
Return values
$thissetSearchDefault()
public
setSearchDefault(bool $searchDefault) : $this
Parameters
- $searchDefault : bool
Return values
$thissetSearchDefaultOptionId()
public
setSearchDefaultOptionId(int|null $searchDefaultOptionId) : $this
Parameters
- $searchDefaultOptionId : int|null
Return values
$thissetSearchDefaultValue()
public
setSearchDefaultValue(string|null $searchDefaultValue) : $this
Parameters
- $searchDefaultValue : string|null
Return values
$thissetSearchType()
public
setSearchType(int|null $searchType) : $this
Parameters
- $searchType : int|null
Return values
$thissetSourceRulesCollection()
public
setSourceRulesCollection(Collection<int, ParameterRuleSource>|array<int, ParameterRuleSource> $collection) : self
Parameters
- $collection : Collection<int, ParameterRuleSource>|array<int, ParameterRuleSource>
Return values
selfsetSubstitution()
public
setSubstitution(bool $substitution) : $this
Parameters
- $substitution : bool
Return values
$thissetTargetRulesCollection()
public
setTargetRulesCollection(Collection<int, ParameterRuleTarget>|array<int, ParameterRuleTarget> $collection) : self
Parameters
- $collection : Collection<int, ParameterRuleTarget>|array<int, ParameterRuleTarget>
Return values
selfsetThrowErrorOnBlacklistedWord()
public
setThrowErrorOnBlacklistedWord(bool $throwErrorOnBlacklistedWord) : $this
Parameters
- $throwErrorOnBlacklistedWord : bool
Return values
$thissetThrowErrorOnUrl()
public
setThrowErrorOnUrl(bool $throwErrorOnUrl) : $this
Parameters
- $throwErrorOnUrl : bool
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$thissetType()
public
setType(int|null $type) : $this
Parameters
- $type : int|null
Return values
$thissetUseEditor()
public
setUseEditor(bool $useEditor) : $this
Parameters
- $useEditor : bool
Return values
$thissetVisibleOptionsCount()
public
setVisibleOptionsCount(int|null $visibleOptionsCount) : $this
Parameters
- $visibleOptionsCount : int|null
Return values
$thistranslationCollectionInit()
public
translationCollectionInit() : void
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>