phpDocumentor

CodeWidget extends AbstractWidget
in package
implements StyleEditApiDataProviderInterface

Class CodeWidget

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  : SourcecodeOption
__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

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
throws
Exception
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
throws
ContentNotFoundException
throws
UnfinishedBuildException
Return values
JsonSerializable|stdClass|array<string|int, mixed>

data

htmlContent()

public htmlContent(Language|null $currentLanguage) : string
Parameters
$currentLanguage : Language|null
Return values
string

persist()

public persist() : void
Tags
throws
Exception
Return values
void

previewContent()

public previewContent(Language|null $currentLanguage) : string
Parameters
$currentLanguage : Language|null
Tags
throws
Exception
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
throws
Exception
Return values
void

validateJsonObject()

Used to provide specific validation criteria for passed object before creation

protected static validateJsonObject(stdClass $jsonObject) : bool
Parameters
$jsonObject : stdClass
Tags
throws
Exception
Return values
bool

Search results