Documentation

ActivityCategory
in package
uses IdentifiableTrait

Activity Category model.

Tags
psalm-type

ActivityCategoryArrayType = array{ id: int, name: ?string, nameEn: ?string, }

psalm-type

ActivityCategoryGdprArrayType = array{ id: int, name: ImportedLocalisedTextGdprArrayType, }

psalm-import-type

LocalisedTextGdprArrayType from LocalisedTextModel as ImportedLocalisedTextGdprArrayType

Attributes
#[Entity]

Table of Contents

Properties

$activities  : Collection<string|int, Activity>
The Activities this Category 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.
$name  : ActivityLocalisedText
Name for the Category.

Methods

__construct()  : mixed
addActivity()  : void
getActivities()  : array<string|int, Activity>
getId()  : int|null
Get the identifier of the object.
getName()  : ActivityLocalisedText
removeActivity()  : void
setId()  : void
Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
setName()  : void
toArray()  : ActivityCategoryArrayType
toGdprArray()  : ActivityCategoryGdprArrayType

Properties

$activities

The Activities this Category belongs to.

protected Collection<string|int, Activity> $activities
Attributes
#[ManyToMany]
$targetEntity: \Activity\Model\Activity::class
$mappedBy: 'categories'
$cascade: ['persist']

$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]

$name

Name for the Category.

protected ActivityLocalisedText $name
Attributes
#[JoinColumn]
$name: 'name_id'
$referencedColumnName: 'id'
$nullable: false
#[OneToOne]
$targetEntity: \Activity\Model\ActivityLocalisedText::class
$cascade: ['persist', 'remove']
$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()

public toArray() : ActivityCategoryArrayType
Return values
ActivityCategoryArrayType

toGdprArray()

public toGdprArray() : ActivityCategoryGdprArrayType
Return values
ActivityCategoryGdprArrayType

        
On this page

Search results