CoolCMS API

CategoryParameterRel extends BaseEntity
in package
implements CategoryParameterRelInterface

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

Table of Contents

Interfaces

CategoryParameterRelInterface
Parameter targeting row of an advert category (Bazaar, Comcat): which parameter or option the advert form of the category shows, in which group and order, and whether it is required or searchable. Written by {@see \App\Core\Traits\Api\Models\Managers\CategoryParameterRelSyncTrait}.

Properties

$category  : TCategory|null
$categoryId  : int|null
$order  : int
$parameterGroupId  : int|null
$parameterId  : int|null
$required  : bool
$useInSearch  : bool

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getCategory()  : TCategory|null
getCategoryId()  : int|null
getOrder()  : int
getParameterGroupId()  : int|null
getParameterId()  : int|null
getRequired()  : bool
getUseInSearch()  : bool
isRequired()  : bool
isUseInSearch()  : bool
setCategory()  : $this
setCategoryId()  : $this
setOrder()  : $this
setParameterGroupId()  : $this
setParameterId()  : $this
setRequired()  : $this
setUseInSearch()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$categoryId

protected int|null $categoryId = null
Attributes
#[Column]
$name: 'cms_mod_comcat_categories_category_id'
$type: 'integer'
$insertable: false
$updatable: false
$nullable: true
$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]

$parameterId

protected int|null $parameterId = null
Attributes
#[Column]
$name: 'cms_mod_comcat_parameters_parameter_id'
$type: 'integer'
$options: ['unsigned' => true]
#[Id]
#[Identity]

$required

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

$useInSearch

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

Methods

__construct()

public __construct([mixed $category = null ][, int|null $categoryId = null ][, int|null $parameterId = null ][, int $order = 0 ][, bool $required = false ][, bool $useInSearch = true ][, int|null $parameterGroupId = null ]) : mixed
Parameters
$category : mixed = null
$categoryId : int|null = null
$parameterId : int|null = null
$order : int = 0
$required : bool = false
$useInSearch : bool = true
$parameterGroupId : int|null = null

callInitMethods()

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

public callInitMethods() : void

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>

setCategory()

public setCategory(TCategory|null $category) : $this
Parameters
$category : TCategory|null
Return values
$this

setCategoryId()

public setCategoryId(int|null $categoryId) : $this
Parameters
$categoryId : int|null
Return values
$this

setOrder()

public setOrder(int $order) : $this
Parameters
$order : int
Return values
$this

setParameterGroupId()

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

setParameterId()

public setParameterId(int|null $parameterId) : $this
Parameters
$parameterId : int|null
Return values
$this

setRequired()

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

setUseInSearch()

public setUseInSearch(bool $useInSearch) : $this
Parameters
$useInSearch : bool
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