EMailDetails
in package
Card describing an item (share, event, conversation...) in an email, rendered by {@see IEMailTemplate::addBodyDetails()}.
All values are plain text and escaped by the template.
Example:
$details = new EMailDetails('Q3 board review'); $details->setSubtitle('Thursday, October 15, 2026') ->setDateBadge('Oct', '15'); $details->addRow('Where') ->text('Meeting room 2') ->link('Join in Nextcloud Talk', 'https://cloud.example.com/call/abc'); $emailTemplate->addBodyDetails($details);
Tags
Attributes
- #[Consumable]
- $since: '36.0.0'
Table of Contents
Properties
- $dateBadge : array{month: string, day: string}|null
- $initialsName : string|null
- $rows : array<int, EMailDetailsRow>
- $subtitle : string
- $title : string
Methods
- __construct() : mixed
- addRow() : EMailDetailsRow
- Add a labelled row, fill it through the returned row
- getDateBadge() : array{month: string, day: string}|null
- getInitialsName() : string|null
- getRows() : array<int, EMailDetailsRow>
- getSubtitle() : string
- getTitle() : string
- setDateBadge() : self
- Show a calendar badge next to the title, replaces any initials circle
- setInitials() : self
- Show an initials circle next to the title, replaces any date badge
- setSubtitle() : self
Properties
$dateBadge
private
array{month: string, day: string}|null
$dateBadge
= null
$initialsName
private
string|null
$initialsName
= null
$rows
private
array<int, EMailDetailsRow>
$rows
= []
$subtitle
private
string
$subtitle
= ''
$title
private
string
$title
Methods
__construct()
public
__construct(string $title) : mixed
Parameters
- $title : string
Tags
addRow()
Add a labelled row, fill it through the returned row
public
addRow(string $label) : EMailDetailsRow
Parameters
- $label : string
Tags
Return values
EMailDetailsRowgetDateBadge()
public
getDateBadge() : array{month: string, day: string}|null
Tags
Return values
array{month: string, day: string}|nullgetInitialsName()
public
getInitialsName() : string|null
Tags
Return values
string|nullgetRows()
public
getRows() : array<int, EMailDetailsRow>
Tags
Return values
array<int, EMailDetailsRow>getSubtitle()
public
getSubtitle() : string
Tags
Return values
stringgetTitle()
public
getTitle() : string
Tags
Return values
stringsetDateBadge()
Show a calendar badge next to the title, replaces any initials circle
public
setDateBadge(string $month, string $day) : self
Parameters
- $month : string
-
Localized short month name, e.g. "Oct"
- $day : string
-
Day of the month, e.g. "15"
Tags
Return values
selfsetInitials()
Show an initials circle next to the title, replaces any date badge
public
setInitials(string $name) : self
Parameters
- $name : string
-
Name the initials are computed from
Tags
Return values
selfsetSubtitle()
public
setSubtitle(string $subtitle) : self
Parameters
- $subtitle : string