class Iframe extends TemplateGenerator

Properties

protected array $attributes from  TemplateGenerator
protected array $defaultAttributes from  TemplateGenerator
protected array $defaultIframeAttributes
protected string[] $iframeAttributes

Methods

string
getContentTemplate()

Build the template representing the embedded content

string
getTemplate(array $attributes)

Build a template based on a list of attributes

string
expr(string $expr)

Format an attribute value to be used in an XPath expression

string
generateAttributes(array $attributes)

Generate xsl:attributes elements from an array

string
generateStyle(array $properties)

Generate a CSS declaration based on an array of CSS properties

string
getResponsivePadding()

Generate and return the padding declaration used in the responsive wrapper

string
getUnwrappedTemplate()

Generate and return a responsive template for the embedded content

string
getWrappedTemplate()

Generate and return a template for the embedded content, complete with a responsive wrapper

bool
hasDynamicHeight()

Test whether current template has a dynamic height

bool
hasDynamicWidth()

Test whether current template has a dynamic width

array
mergeAttributes(array $defaultAttributes, array $newAttributes)

Merge two array of attributes

bool
needsWrapper()

Test whether current template needs a wrapper to be responsive

array
getFilteredAttributes()

Filter the attributes to keep only those that can be used in an iframe

Details

at line 32
protected string getContentTemplate()

Build the template representing the embedded content

Return Value

string

in TemplateGenerator at line 42
string getTemplate(array $attributes)

Build a template based on a list of attributes

Parameters

array $attributes

Return Value

string

in TemplateGenerator at line 55
protected string expr(string $expr)

Format an attribute value to be used in an XPath expression

Parameters

string $expr

Original value

Return Value

string

Formatted value

in TemplateGenerator at line 68
protected string generateAttributes(array $attributes)

Generate xsl:attributes elements from an array

Parameters

array $attributes

Array of [name => value] where value can be XSL code

Return Value

string

XSL source

in TemplateGenerator at line 93
protected string generateStyle(array $properties)

Generate a CSS declaration based on an array of CSS properties

Parameters

array $properties

Property name => property value

Return Value

string

in TemplateGenerator at line 111
protected string getResponsivePadding()

Generate and return the padding declaration used in the responsive wrapper

Return Value

string

in TemplateGenerator at line 141
protected string getUnwrappedTemplate()

Generate and return a responsive template for the embedded content

Return Value

string

in TemplateGenerator at line 170
protected string getWrappedTemplate()

Generate and return a template for the embedded content, complete with a responsive wrapper

Return Value

string

in TemplateGenerator at line 193
protected bool hasDynamicHeight()

Test whether current template has a dynamic height

Return Value

bool

in TemplateGenerator at line 203
protected bool hasDynamicWidth()

Test whether current template has a dynamic width

Return Value

bool

in TemplateGenerator at line 215
protected array mergeAttributes(array $defaultAttributes, array $newAttributes)

Merge two array of attributes

Parameters

array $defaultAttributes
array $newAttributes

Return Value

array

in TemplateGenerator at line 232
protected bool needsWrapper()

Test whether current template needs a wrapper to be responsive

Return Value

bool

at line 44
protected array getFilteredAttributes()

Filter the attributes to keep only those that can be used in an iframe

Return Value

array