CoolCMS API

PollPlaceRel extends BaseEntity
in package
implements PollPlaceRelInterface

AbstractYes

Join entity between a poll and a poll place (`cms_mod_base_poll_place_relations`).

PK is a derived identity (poll + pollPlace). order is the poll's position within the place (drag & drop in the place editor). Both FK associations are part of the identity, so the Api hydrator does not drop them as back-references. Association mapping lives in the concrete variants (Admin/Api/Front).

Tags
template
implements
Attributes
#[MappedSuperclass]
#[TableAlias]
$alias: 'pollPlaceRel'

Table of Contents

Interfaces

PollPlaceRelInterface
Join entity of a poll place (`*PollPlaceRel`); holds the poll reference.

Properties

$order  : int
$poll  : TPoll|null
$pollPlace  : TPollPlace|null

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.
getOrder()  : int
getPoll()  : TPoll|null
getPollPlace()  : TPollPlace|null
setOrder()  : $this
setPoll()  : $this
setPollPlace()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$order

protected int $order = 0
Attributes
#[Column]
$name: '`order`'
$type: 'integer'
$options: ['unsigned' => true, 'default' => 0]

Methods

__construct()

public __construct([mixed $poll = null ][, mixed $pollPlace = null ][, int $order = 0 ]) : mixed
Parameters
$poll : mixed = null
$pollPlace : mixed = null
$order : int = 0

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>

getPoll()

public getPoll() : TPoll|null
Return values
TPoll|null

getPollPlace()

public getPollPlace() : TPollPlace|null
Return values
TPollPlace|null

setOrder()

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

setPoll()

public setPoll(TPoll|null $poll) : $this
Parameters
$poll : TPoll|null
Return values
$this

setPollPlace()

public setPollPlace(TPollPlace|null $pollPlace) : $this
Parameters
$pollPlace : TPollPlace|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