Documentation

MemberAlbum extends VirtualAlbum
in package

Contains all photos with tags of a member.

This is a VirtualAlbum, meaning that it is not persisted.

Table of Contents

Properties

$children  : Collection<string|int, Album>
all the subalbums Note: These are fetched extra lazy so we can efficiently retrieve an album count.
$coverPath  : string|null
The cover photo to display with the album.
$createdAt  : DateTime
The date at which the entity was created.
$endDateTime  : DateTime|null
End date of photos in album.
$id  : int|null
The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
$name  : string
Name of the album.
$parent  : Album|null
Parent album, null if there is no parent album.
$photos  : Collection<string|int, Photo>
all the photo's in this album.
$published  : bool
Whether the album is published.
$startDateTime  : DateTime|null
First date of photos in album.
$updatedAt  : DateTime
The date at which the entity was updated.
$member  : Member

Methods

__construct()  : mixed
addAlbum()  : void
Add a sub album to an album.
addPhoto()  : void
Add a photo to an album.
addPhotos()  : void
getAlbumCount()  : int
Get the amount of subalbums in the album.
getChildren()  : Collection<string|int, Album>
Gets an array of all child albums.
getCoverPath()  : string|null
Get the album cover.
getCreatedAt()  : DateTime
getEndDateTime()  : DateTime|null
Get the end date.
getId()  : int|null
Get the identifier of the object.
getMember()  : Member
getName()  : string
Get the album name.
getParent()  : Album|null
Get the parent album.
getPhotoCount()  : int
Get the amount of photos in the album.
getPhotos()  : Collection<string|int, Photo>
Gets an array of all the photos in this album.
getPublished()  : bool
Get the published state.
getResourceId()  : string
Get the resource ID.
getStartDateTime()  : DateTime|null
Get the start date.
getUpdatedAt()  : DateTime
isPublished()  : bool
Whether this album is published.
prePersist()  : void
Automatically fill in the `DateTime`s before the initial call to `persist()`.
preUpdate()  : void
Automatically update the `updatedAt` `DateTime` when doing an update to the entity.
removeAlbum()  : void
Remove a subalbum.
setCoverPath()  : void
Set the cover photo for the album.
setEndDateTime()  : void
Set the end date.
setId()  : void
Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
setName()  : void
Set the name of the album.
setParent()  : void
Set the parent of the album.
setPublished()  : void
Set the published state.
setStartDateTime()  : void
Set the start date.
toArray()  : DateTime, published: bool, name: string, parent: null, children: array{}, photos: array{}, coverPath: ?string, photoCount: int, albumCount: int}
Returns an associative array representation of this object.
toArrayWithChildren()  : ImportedPhotoArrayType[], coverPath: ?string, photoCount: int, albumCount: int}
Returns an associative array representation of this object including all child objects.
setCreatedAt()  : void
setUpdatedAt()  : void

Properties

$children

all the subalbums Note: These are fetched extra lazy so we can efficiently retrieve an album count.

protected Collection<string|int, Album> $children
Attributes
#[OneToMany]
$targetEntity: self::class
$mappedBy: 'parent'
$cascade: ['persist', 'remove']
$fetch: 'EXTRA_LAZY'

$coverPath

The cover photo to display with the album.

protected string|null $coverPath = null
Attributes
#[Column]
$type: 'string'
$nullable: true

$createdAt

The date at which the entity was created.

protected DateTime $createdAt
Attributes
#[Column]
$type: 'datetime'

$endDateTime

End date of photos in album.

protected DateTime|null $endDateTime = null
Attributes
#[Column]
$type: 'datetime'
$nullable: true

$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 of the album.

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

$parent

Parent album, null if there is no parent album.

protected Album|null $parent = null
Attributes
#[JoinColumn]
$name: 'parent_id'
$referencedColumnName: 'id'
#[ManyToOne]
$targetEntity: self::class
$inversedBy: 'children'

$photos

all the photo's in this album.

protected Collection<string|int, Photo> $photos

Note: These are fetched extra lazy so we can efficiently retrieve an photo count.

Attributes
#[OneToMany]
$targetEntity: \Photo\Model\Photo::class
$mappedBy: 'album'
$cascade: ['persist', 'remove']
$fetch: 'EXTRA_LAZY'
#[OrderBy]
$value: ['dateTime' => 'ASC']

$published

Whether the album is published.

protected bool $published = false
Attributes
#[Column]
$type: 'boolean'

$startDateTime

First date of photos in album.

protected DateTime|null $startDateTime = null
Attributes
#[Column]
$type: 'datetime'
$nullable: true

$updatedAt

The date at which the entity was updated.

protected DateTime $updatedAt
Attributes
#[Column]
$type: 'datetime'

Methods

addAlbum()

Add a sub album to an album.

public addAlbum(Album $album) : void
Parameters
$album : Album
Tags
throws
Exception

addPhotos()

public addPhotos(array<string|int, Photo$photos) : void
Parameters
$photos : array<string|int, Photo>

getAlbumCount()

Get the amount of subalbums in the album.

public getAlbumCount() : int
Return values
int

getChildren()

Gets an array of all child albums.

public getChildren() : Collection<string|int, Album>
Return values
Collection<string|int, Album>

getCoverPath()

Get the album cover.

public getCoverPath() : string|null
Return values
string|null

getEndDateTime()

Get the end date.

public getEndDateTime() : DateTime|null
Return values
DateTime|null

getId()

Get the identifier of the object.

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

getName()

Get the album name.

public getName() : string
Return values
string

$name

getPhotoCount()

Get the amount of photos in the album.

public getPhotoCount([bool $includeSubAlbums = false ]) : int
Parameters
$includeSubAlbums : bool = false
Return values
int

getPhotos()

Gets an array of all the photos in this album.

public getPhotos() : Collection<string|int, Photo>
Return values
Collection<string|int, Photo>

getPublished()

Get the published state.

public getPublished() : bool
Return values
bool

getResourceId()

Get the resource ID.

public getResourceId() : string
Return values
string

getStartDateTime()

Get the start date.

public getStartDateTime() : DateTime|null
Return values
DateTime|null

isPublished()

Whether this album is published.

public isPublished() : bool
Return values
bool

prePersist()

Automatically fill in the `DateTime`s before the initial call to `persist()`.

public prePersist() : void
Attributes
#[PrePersist]

preUpdate()

Automatically update the `updatedAt` `DateTime` when doing an update to the entity.

public preUpdate() : void
Attributes
#[PreUpdate]

removeAlbum()

Remove a subalbum.

public removeAlbum(Album|null $album) : void
Parameters
$album : Album|null

setCoverPath()

Set the cover photo for the album.

public setCoverPath(string|null $photo) : void
Parameters
$photo : string|null

setEndDateTime()

Set the end date.

public setEndDateTime(DateTime|null $endDateTime) : void
Parameters
$endDateTime : DateTime|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

setName()

Set the name of the album.

public setName(string $name) : void
Parameters
$name : string

setParent()

Set the parent of the album.

public setParent(Album|null $parent) : void
Parameters
$parent : Album|null
Tags
throws
Exception

setPublished()

Set the published state.

public setPublished(bool $published) : void
Parameters
$published : bool

setStartDateTime()

Set the start date.

public setStartDateTime(DateTime|null $startDateTime) : void
Parameters
$startDateTime : DateTime|null

toArray()

Returns an associative array representation of this object.

public toArray() : DateTime, published: bool, name: string, parent: null, children: array{}, photos: array{}, coverPath: ?string, photoCount: int, albumCount: int}
Return values
DateTime, published: bool, name: string, parent: null, children: array{}, photos: array{}, coverPath: ?string, photoCount: int, albumCount: int}

toArrayWithChildren()

Returns an associative array representation of this object including all child objects.

public toArrayWithChildren() : ImportedPhotoArrayType[], coverPath: ?string, photoCount: int, albumCount: int}
Return values
ImportedPhotoArrayType[], coverPath: ?string, photoCount: int, albumCount: int}

setCreatedAt()

private setCreatedAt(DateTime $createdAt) : void
Parameters
$createdAt : DateTime

setUpdatedAt()

private setUpdatedAt(DateTime $updatedAt) : void
Parameters
$updatedAt : DateTime

        
On this page

Search results