ContentText
in package
implements
LocalizedContentAttributeInterface, JsonSerializable
Class ContentText
This class represents the localized content text
Tags
Interfaces, Classes and Traits
- LocalizedContentAttributeInterface
- Interface LocalizedContentAttributeInterface
- JsonSerializable
Table of Contents
- $languageCode : string
- Language code
- $text : string
- Content text
- __construct() : mixed
- ContentText constructor
- content() : string
- Return the content text
- jsonSerialize() : mixed
- Specify data which should be serialized to JSON
- languageCode() : string
- Return the language code
Properties
$languageCode
Language code
protected
string
$languageCode
$text
Content text
protected
string
$text
Methods
__construct()
ContentText constructor
public
__construct(string $text, LanguageCode $languageCode) : mixed
Parameters
- $text : string
-
Content text
- $languageCode : LanguageCode
-
Language code
Return values
mixed —content()
Return the content text
public
content() : string
Return values
string —jsonSerialize()
Specify data which should be serialized to JSON
public
jsonSerialize() : mixed
Tags
Return values
mixed —data which can be serialized by json_encode, which is a value of any type other than a resource.
languageCode()
Return the language code
public
languageCode() : string