WeeklyPhoto
in package
implements
ResourceInterface
uses
IdentifiableTrait
Maintains a list of the "Foto of the week".
Attributes
- #[Entity]
Table of Contents
Interfaces
- ResourceInterface
Properties
- $hidden : bool
- If a photo of the week is hidden, it is not shown to visitors who are NOT logged in.
- $id : int|null
- The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
- $photo : Photo
- The photo of the week.
- $week : DateTime
- The start date of the week the photo is based on.
Methods
- getId() : int|null
- Get the identifier of the object.
- getPhoto() : Photo
- getResourceId() : string
- Get the resource ID.
- getWeek() : DateTime
- isHidden() : bool
- setHidden() : void
- setId() : void
- Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
- setPhoto() : void
- setWeek() : void
Properties
$hidden
If a photo of the week is hidden, it is not shown to visitors who are NOT logged in.
protected
bool
$hidden
= false
Attributes
- #[Column]
- $type: 'boolean'
$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]
$photo
The photo of the week.
protected
Photo
$photo
Attributes
- #[JoinColumn]
- $name: 'photo_id'
- $referencedColumnName: 'id'
- $nullable: false
- #[OneToOne]
- $targetEntity: \Photo\Model\Photo::class
- $inversedBy: 'weeklyPhoto'
$week
The start date of the week the photo is based on.
protected
DateTime
$week
Attributes
- #[Column]
- $type: 'date'
Methods
getId()
Get the identifier of the object.
public
getId() : int|null
Tags
Return values
int|nullgetPhoto()
public
getPhoto() : Photo
Return values
PhotogetResourceId()
Get the resource ID.
public
getResourceId() : string
Return values
stringgetWeek()
public
getWeek() : DateTime
Return values
DateTimeisHidden()
public
isHidden() : bool
Return values
boolsetHidden()
public
setHidden(bool $hidden) : void
Parameters
- $hidden : bool
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
setPhoto()
public
setPhoto(Photo $photo) : void
Parameters
- $photo : Photo
setWeek()
public
setWeek(DateTime $week) : void
Parameters
- $week : DateTime