TextWidget
extends AbstractWidget
in package
implements
StyleEditApiDataProviderInterface
Class TextWidget
Interfaces, Classes and Traits
- StyleEditApiDataProviderInterface
- Interface StyleEditApiDataProviderInterface
Table of Contents
- $class : string
- $contentReadService : ContentReadServiceInterface
- $contentWriteService : ContentWriteServiceInterface
- $fieldsets : array<string|int, FieldSet>
- $id : TextBox
- ID
- $jsonObject : stdClass
- $static_id : string
- $text : WysiwygOption
- __construct() : mixed
- TextWidget constructor.
- apiData() : JsonSerializable|stdClass|array<string|int, mixed>
- Data can be accessed on route:
- createFromJsonObject() : ContentGeneratorInterface
- htmlContent() : string
- jsonSerialize() : mixed
- Specify data which should be serialized to JSON
- persist() : void
- previewContent() : string
- update() : void
- createOptionsArray() : array<string|int, mixed>
- list all the options of a widget as $option->
- createWidgetObject() : static
- initializePropertiesFromFieldset() : void
- validateJsonObject() : bool
- Used to provide specific validation criteria for passed object before creation
Properties
$class
protected
string
$class
$contentReadService
protected
ContentReadServiceInterface
$contentReadService
$contentWriteService
protected
ContentWriteServiceInterface
$contentWriteService
$fieldsets
protected
array<string|int, FieldSet>
$fieldsets
= []
$id
ID
protected
TextBox
$id
$jsonObject
protected
stdClass
$jsonObject
$static_id
protected
string
$static_id
$text
protected
WysiwygOption
$text
Methods
__construct()
TextWidget constructor.
public
__construct(string $static_id, array<string|int, FieldSet> $fieldsets, stdClass $jsonObject, ContentReadServiceInterface $contentReadService, ContentWriteServiceInterface $contentWriteService) : mixed
Parameters
- $static_id : string
- $fieldsets : array<string|int, FieldSet>
- $jsonObject : stdClass
- $contentReadService : ContentReadServiceInterface
- $contentWriteService : ContentWriteServiceInterface
Tags
Return values
mixed —apiData()
Data can be accessed on route:
public
static apiData() : JsonSerializable|stdClass|array<string|int, mixed>
GXModules/Gambio/StyleEdit/Api/api.php/styleedit/$LANGUAGE_CODE/widget/$THEME_ID/$WIDGET_ID
Tags
Return values
JsonSerializable|stdClass|array<string|int, mixed> —createFromJsonObject()
public
static createFromJsonObject(stdClass $jsonObject) : ContentGeneratorInterface
Parameters
- $jsonObject : stdClass
Tags
Return values
ContentGeneratorInterface —htmlContent()
public
htmlContent(Language|null $currentLanguage) : string
Parameters
- $currentLanguage : Language|null
Tags
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.
persist()
public
persist() : void
Tags
Return values
void —previewContent()
public
previewContent(Language|null $currentLanguage) : string
Parameters
- $currentLanguage : Language|null
Tags
Return values
string —update()
public
update() : void
Return values
void —createOptionsArray()
list all the options of a widget as $option->
protected
static createOptionsArray(stdClass $widget) : array<string|int, mixed>
Parameters
- $widget : stdClass
Return values
array<string|int, mixed> —createWidgetObject()
protected
static createWidgetObject(stdClass $jsonObject[, mixed $fieldSets = [] ]) : static
Parameters
- $jsonObject : stdClass
- $fieldSets : mixed = []
Return values
static —initializePropertiesFromFieldset()
protected
initializePropertiesFromFieldset() : void
Tags
Return values
void —validateJsonObject()
Used to provide specific validation criteria for passed object before creation
protected
static validateJsonObject(stdClass $jsonObject) : bool
Parameters
- $jsonObject : stdClass