Documentation

SignupOption
in package
uses IdentifiableTrait

SignupOption model.

Contains the possible options of a field of type ``option''.

Tags
psalm-import-type

LocalisedTextGdprArrayType from LocalisedTextModel as ImportedLocalisedTextGdprArrayType

psalm-type

SignupOptionGdprArrayType = array{ id: int, value: ImportedLocalisedTextGdprArrayType, }

Attributes
#[Entity]

Table of Contents

Properties

$field  : SignupField
Field that the option belongs to.
$id  : int|null
The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
$value  : ActivityLocalisedText
The value of the option.

Methods

getField()  : SignupField
getId()  : int|null
Get the identifier of the object.
getValue()  : ActivityLocalisedText
setField()  : void
Set the field the option belongs to.
setId()  : void
Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
setValue()  : void
Set the value of the option.
toArray()  : array{id: int, value: ?string, valueEn: ?string}
Returns an associative array representation of this object.
toGdprArray()  : SignupOptionGdprArrayType

Properties

$field

Field that the option belongs to.

protected SignupField $field
Attributes
#[JoinColumn]
$name: 'field_id'
$referencedColumnName: 'id'
$nullable: false
#[ManyToOne]
$targetEntity: \Activity\Model\SignupField::class
$cascade: ['persist']
$inversedBy: 'options'

$id

The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.

protected int|null $id = null
Attributes
#[Column]
$type: 'integer'
#[GeneratedValue]
$strategy: 'IDENTITY'
#[Id]

$value

The value of the option.

protected ActivityLocalisedText $value
Attributes
#[JoinColumn]
$name: 'value_id'
$referencedColumnName: 'id'
$nullable: false
#[OneToOne]
$targetEntity: \Activity\Model\ActivityLocalisedText::class
$cascade: ['persist']
$orphanRemoval: true

Methods

getId()

Get the identifier of the object.

public getId() : int|null
Tags
psalm-ignore-nullable-return
Return values
int|null

setId()

Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!

public setId(int|null $id) : void
Parameters
$id : int|null

toArray()

Returns an associative array representation of this object.

public toArray() : array{id: int, value: ?string, valueEn: ?string}
Return values
array{id: int, value: ?string, valueEn: ?string}

toGdprArray()

public toGdprArray() : SignupOptionGdprArrayType
Return values
SignupOptionGdprArrayType

        
On this page

Search results