PrimaryButton
in package
implements
OfcpEvent
FinalYes
The primary button
Table of Contents
Interfaces
- OfcpEvent
- Basic interface for OFCP-Events.
Properties
Methods
- __construct() : self
- The primary button
- from_json() : self
- Parse JSON data into an instance of this class.
- getTitle() : string
- getUrl() : string
- jsonSerialize() : array<string|int, mixed>
- setTitle() : void
- setUrl() : void
Properties
$title
private
string
$title
$url
private
string
$url
Methods
__construct()
The primary button
public
__construct(string $title, string $url) : self
Parameters
- $title : string
-
The title of the button
- $url : string
-
The URL the button should link to
Return values
selffrom_json()
Parse JSON data into an instance of this class.
public
static from_json(string|array<string|int, mixed> $json) : self
Parameters
- $json : string|array<string|int, mixed>
-
JSON data to parse.
Return values
selfgetTitle()
public
getTitle() : string
Return values
stringgetUrl()
public
getUrl() : string
Return values
stringjsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>setTitle()
public
setTitle(string $title) : void
Parameters
- $title : string
setUrl()
public
setUrl(string $url) : void
Parameters
- $url : string