ImageWidget
extends AbstractWidget
in package
Class ImageWidget
Table of Contents
- FALLBACK_IMAGE = '//www.gambio-shop.de/shop1/images/logos/logo-ihr-shop_logo.png'
- $alt : TextBox
- $class : TextBox
- $fieldsets : array<string|int, FieldSet>
- $height : NumberBoxOption
- $id : TextBox
- ID
- $image : string
- $jsonObject : stdClass
- $link : CheckboxOption
- $name : TextBox
- $responsive : CheckboxOption
- $static_id : string
- $target : DropdownSelectOption
- $title : TextBox
- $type : string
- $width : NumberBoxOption
- __construct() : mixed
- AbstractWidget constructor.
- 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
- getClassName() : string
- initializePropertiesFromFieldset() : void
- validateJsonObject() : bool
- Used to provide specific validation criteria for passed object before creation
- htmlTemplate() : string
- parseAttributeValues() : string
Constants
FALLBACK_IMAGE
protected
mixed
FALLBACK_IMAGE
= '//www.gambio-shop.de/shop1/images/logos/logo-ihr-shop_logo.png'
Properties
$alt
protected
TextBox
$alt
$class
protected
TextBox
$class
$fieldsets
protected
array<string|int, FieldSet>
$fieldsets
= []
$height
protected
NumberBoxOption
$height
$id
ID
protected
TextBox
$id
$image
protected
string
$image
$jsonObject
protected
stdClass
$jsonObject
$link
protected
CheckboxOption
$link
$name
protected
TextBox
$name
$responsive
protected
CheckboxOption
$responsive
$static_id
protected
string
$static_id
$target
protected
DropdownSelectOption
$target
$title
protected
TextBox
$title
$type
protected
string
$type
= 'image'
$width
protected
NumberBoxOption
$width
Methods
__construct()
AbstractWidget constructor.
public
__construct(string $static_id, array<string|int, FieldSet> $fieldsets, stdClass $jsonObject) : mixed
Parameters
- $static_id : string
- $fieldsets : array<string|int, FieldSet>
- $jsonObject : stdClass
Tags
Return values
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
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
Return values
void —previewContent()
public
previewContent(Language|null $currentLanguage) : string
Parameters
- $currentLanguage : Language|null
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[, array<string|int, mixed> $fieldSets = [] ]) : static
Parameters
- $jsonObject : stdClass
- $fieldSets : array<string|int, mixed> = []
Tags
Return values
static —getClassName()
protected
getClassName( $value) : string
Parameters
Return values
string —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
Return values
bool —htmlTemplate()
private
htmlTemplate() : string
Return values
string —parseAttributeValues()
private
parseAttributeValues( $property, $value) : string