CoolCMS API

AdvertParameterRel extends AdvertParameterRel
in package

Admin variant of an advert targeting parameter (range), edited with a multiplier in the advert form.

The PK is the surrogate id inherited from the base class.

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_base_advert_parameter_relations'
#[TableAlias]
'advertParameterRel'

Table of Contents

Properties

$advert  : TAdvert|null
$from  : string|null
$id  : int|null
$name  : string
$to  : string|null

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getAdvert()  : TAdvert|null
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getFrom()  : string|null
getId()  : int|null
getName()  : string
getTo()  : string|null
isPersisted()  : bool
setAdvert()  : $this
setFrom()  : $this
setId()  : $this
setName()  : $this
setTo()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$advert

protected TAdvert|null $advert = null
Attributes
#[EntityOf]
\App\UI\Admin\Base\Models\Entities\Advert::class
#[JoinColumn]
$name: 'cms_mod_base_adverts_advert_id'
$referencedColumnName: 'advert_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Base\Models\Entities\Advert::class
$inversedBy: 'parameters'
#[ParentRef]

$from

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

$id

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

$name

protected string $name = ''
Attributes
#[Column]
$name: 'name'
$type: 'string'
$length: 255

$to

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

Methods

__construct()

public __construct([int|null $id = null ][, mixed $advert = null ][, string $name = '' ][, string|null $from = null ][, string|null $to = null ]) : mixed
Parameters
$id : int|null = null
$advert : mixed = null
$name : string = ''
$from : string|null = null
$to : string|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>

setAdvert()

public setAdvert(TAdvert|null $advert) : $this
Parameters
$advert : TAdvert|null
Return values
$this

setFrom()

public setFrom(string|null $from) : $this
Parameters
$from : string|null
Return values
$this

setId()

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

setName()

public setName(string $name) : $this
Parameters
$name : string
Return values
$this

setTo()

public setTo(string|null $to) : $this
Parameters
$to : string|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