SignupOption
in package
uses
IdentifiableTrait
SignupOption model.
Contains the possible options of a field of type ``option''.
Tags
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
getField()
public
getField() : SignupField
Return values
SignupFieldgetId()
Get the identifier of the object.
public
getId() : int|null
Tags
Return values
int|nullgetValue()
public
getValue() : ActivityLocalisedText
Return values
ActivityLocalisedTextsetField()
Set the field the option belongs to.
public
setField(SignupField $field) : void
Parameters
- $field : SignupField
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
setValue()
Set the value of the option.
public
setValue(ActivityLocalisedText $value) : void
Parameters
- $value : ActivityLocalisedText
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