NewsItem
in package
implements
ResourceInterface
uses
IdentifiableTrait
News item.
Attributes
- #[Entity]
Table of Contents
Interfaces
- ResourceInterface
Properties
- $date : DateTime
- The date the news item was written.
- $dutchContent : string
- The english HTML content of the news.
- $dutchTitle : string
- Dutch title of the news.
- $englishContent : string
- The english HTML content of the news.
- $englishTitle : string
- English title of the news.
- $id : int|null
- The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
- $pinned : bool
- Whether this news item is pinned to the top of the news section or not.
Methods
- getDate() : DateTime
- getDutchContent() : string
- getDutchTitle() : string
- getEnglishContent() : string
- getEnglishTitle() : string
- getId() : int|null
- Get the identifier of the object.
- getPinned() : bool
- getResourceId() : string
- Get the resource ID.
- setDate() : void
- setDutchContent() : void
- setDutchTitle() : void
- setEnglishContent() : void
- setEnglishTitle() : void
- setId() : void
- Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
- setPinned() : void
Properties
$date
The date the news item was written.
protected
DateTime
$date
Attributes
- #[Column]
- $type: 'date'
$dutchContent
The english HTML content of the news.
protected
string
$dutchContent
Attributes
- #[Column]
- $type: 'text'
$dutchTitle
Dutch title of the news.
protected
string
$dutchTitle
Attributes
- #[Column]
- $type: 'string'
$englishContent
The english HTML content of the news.
protected
string
$englishContent
Attributes
- #[Column]
- $type: 'text'
$englishTitle
English title of the news.
protected
string
$englishTitle
Attributes
- #[Column]
- $type: 'string'
$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]
$pinned
Whether this news item is pinned to the top of the news section or not.
protected
bool
$pinned
Attributes
- #[Column]
- $type: 'boolean'
Methods
getDate()
public
getDate() : DateTime
Return values
DateTimegetDutchContent()
public
getDutchContent() : string
Return values
stringgetDutchTitle()
public
getDutchTitle() : string
Return values
stringgetEnglishContent()
public
getEnglishContent() : string
Return values
stringgetEnglishTitle()
public
getEnglishTitle() : string
Return values
stringgetId()
Get the identifier of the object.
public
getId() : int|null
Tags
Return values
int|nullgetPinned()
public
getPinned() : bool
Return values
boolgetResourceId()
Get the resource ID.
public
getResourceId() : string
Return values
stringsetDate()
public
setDate(DateTime $date) : void
Parameters
- $date : DateTime
setDutchContent()
public
setDutchContent(string $dutchContent) : void
Parameters
- $dutchContent : string
setDutchTitle()
public
setDutchTitle(string $dutchTitle) : void
Parameters
- $dutchTitle : string
setEnglishContent()
public
setEnglishContent(string $englishContent) : void
Parameters
- $englishContent : string
setEnglishTitle()
public
setEnglishTitle(string $englishTitle) : void
Parameters
- $englishTitle : string
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
setPinned()
public
setPinned(bool $pinned) : void
Parameters
- $pinned : bool