ContentText

Implements \LocalizedContentAttributeInterface, \JsonSerializable

Class ContentText

This class represents the localized content text

category

System

package

Content

Methods

ContentText constructor

__construct(string $text, \LanguageCode $languageCode) 

Arguments

$text

string

Content text

$languageCode

\LanguageCode

Language code

Return the content text

content() : string

Response

string

Specify data which should be serialized to JSON

jsonSerialize() : mixed
link

https://php.net/manual/en/jsonserializable.jsonserialize.php

since 5.4.0

Response

mixed

data which can be serialized by json_encode, which is a value of any type other than a resource.

Return the language code

languageCode() : string

Response

string

Properties

Content text

text : string
var

Type(s)

string

Language code

languageCode : string
var

Type(s)

string