Nextcloud PHP API (master)

EMailDetails
in package

FinalYes

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
since
36.0.0
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

Methods

__construct()

public __construct(string $title) : mixed
Parameters
$title : string
Tags
since
36.0.0

getDateBadge()

public getDateBadge() : array{month: string, day: string}|null
Tags
since
36.0.0
Return values
array{month: string, day: string}|null

getInitialsName()

public getInitialsName() : string|null
Tags
since
36.0.0
Return values
string|null

getSubtitle()

public getSubtitle() : string
Tags
since
36.0.0
Return values
string

getTitle()

public getTitle() : string
Tags
since
36.0.0
Return values
string

setDateBadge()

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
since
36.0.0
Return values
self

setInitials()

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
since
36.0.0
Return values
self

setSubtitle()

public setSubtitle(string $subtitle) : self
Parameters
$subtitle : string
Tags
since
36.0.0
Return values
self
On this page

Search results