Tag
in package
implements
ResourceInterface
uses
IdentifiableTrait
Tag.
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'Tag'
- #[UniqueConstraint]
- $name: 'tag_idx'
- $columns: ['photo_id', 'member_id']
Table of Contents
Interfaces
- ResourceInterface
Properties
- $id : int|null
- The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
- $member : Member
- $photo : Photo
Methods
- getId() : int|null
- Get the identifier of the object.
- getMember() : Member
- getPhoto() : Photo
- getResourceId() : string
- Get the resource ID.
- setId() : void
- Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
- setMember() : void
- setPhoto() : void
- toArray() : array{id: int, photo_id: int, member_id: int}
- Returns the Tag as an associative array.
- toGdprArray() : TagGdprArrayType
Properties
$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]
$member
protected
Member
$member
Attributes
- #[JoinColumn]
- $name: 'member_id'
- $referencedColumnName: 'lidnr'
- $nullable: false
- #[ManyToOne]
- $targetEntity: \Decision\Model\Member::class
- $inversedBy: 'tags'
$photo
protected
Photo
$photo
Attributes
- #[JoinColumn]
- $name: 'photo_id'
- $referencedColumnName: 'id'
- $nullable: false
- #[ManyToOne]
- $targetEntity: \Photo\Model\Photo::class
- $inversedBy: 'tags'
Methods
getId()
Get the identifier of the object.
public
getId() : int|null
Tags
Return values
int|nullgetMember()
public
getMember() : Member
Return values
MembergetPhoto()
public
getPhoto() : Photo
Return values
PhotogetResourceId()
Get the resource ID.
public
getResourceId() : string
Return values
stringsetId()
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
setMember()
public
setMember(Member $member) : void
Parameters
- $member : Member
setPhoto()
public
setPhoto(Photo $photo) : void
Parameters
- $photo : Photo
toArray()
Returns the Tag as an associative array.
public
toArray() : array{id: int, photo_id: int, member_id: int}
Return values
array{id: int, photo_id: int, member_id: int}toGdprArray()
public
toGdprArray() : TagGdprArrayType