CoolCMS API

PollPlace extends PollPlace
in package

Poll place (`cms_mod_base_poll_places`).

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_base_poll_places'
#[TableAlias]
'pollPlace'

Table of Contents

Properties

$id  : int|null
$name  : string
$pollRels  : Collection

Methods

__construct()  : mixed
addPollRel()  : $this
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getActivePolls()  : Collection<int, TPoll>
Linked polls the website shows: a disabled poll (`active` off) is left out, it does not accept votes either.
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getId()  : int|null
getName()  : string
getPollRels()  : Collection<int, TRel>
getPolls()  : Collection<int, TPoll>
BC: the linked polls, extracted from `pollRels` in `order` order.
isPersisted()  : bool
setId()  : $this
setName()  : $this
setPollRels()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$id

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

$name

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

$pollRels

protected Collection $pollRels
Attributes
#[OneToMany]
$targetEntity: \App\UI\Api\Base\Models\Entities\PollPlaceRel::class
$mappedBy: 'pollPlace'
$cascade: ["persist", "remove"]
$orphanRemoval: true
$fetch: "LAZY"
#[OrderBy]
['order' => 'ASC']

Methods

__construct()

public __construct([int|null $id = null ][, string $name = '' ]) : mixed
Parameters
$id : int|null = null
$name : string = ''

addPollRel()

public addPollRel(TRel $rel) : $this
Parameters
$rel : TRel
Return values
$this

callInitMethods()

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

public callInitMethods() : void

getActivePolls()

Linked polls the website shows: a disabled poll (`active` off) is left out, it does not accept votes either.

public getActivePolls() : Collection<int, TPoll>
Return values
Collection<int, TPoll>

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>

getName()

public getName() : string
Return values
string

getPollRels()

public getPollRels() : Collection<int, TRel>
Return values
Collection<int, TRel>

getPolls()

BC: the linked polls, extracted from `pollRels` in `order` order.

public getPolls() : Collection<int, TPoll>
Return values
Collection<int, TPoll>

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

setPollRels()

public setPollRels(Collection<int, TRel>|array<int, TRel> $pollRels) : $this
Parameters
$pollRels : Collection<int, TRel>|array<int, TRel>
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