Overview

Namespaces

  • Scene7
    • Commands
      • Layer
    • Definitions
    • Helpers
      • Html
        • Attributes
    • Requests

Classes

  • AbstractTag
  • Image
  • Picture
  • Source
  • Overview
  • Namespace
  • Class

Class Picture

Scene7\Helpers\Html\AbstractTag implements Scene7\RenderInterface
Extended by Scene7\Helpers\Html\Picture
Namespace: Scene7\Helpers\Html
Located at Helpers/Html/Picture.php
Methods summary
public
# __construct( array $attributes = [] )
public Scene7\Helpers\Html\Picture
# addSourceFromImage( Scene7\Requests\Image $image, integer[] $multipliers = [], array $attributes = [] )

Parameters

$image
$multipliers
$attributes

Returns

Scene7\Helpers\Html\Picture
public Scene7\Helpers\Html\Picture
# addSourceListFromImage( array $mediaQueries, Scene7\Requests\Image $image, array $multipliers = [], array $attributes = [] )

Add all of the sources with a single call.

Add all of the sources with a single call.

This looks complicated, but the goal is merely to reduce the amount of code you have to write

Parameters

$mediaQueries
$image
$multipliers
$attributes

Returns

Scene7\Helpers\Html\Picture
$this
public Scene7\Helpers\Html\Picture
# setImage( Scene7\Helpers\Html\Image|string $image, array $attributes = [] )

Parameters

$image
$attributes

Returns

Scene7\Helpers\Html\Picture
$this
public
# addSource( Scene7\Helpers\Html\Source $source )
public string
# render( )

Returns

string
protected
# renderSources( )
protected string
# renderImage( )

Returns

string

Throws

RuntimeException
if no image is set
public string
# __toString( )

Returns

string

Overrides

Scene7\Helpers\Html\AbstractTag::__toString()
Methods inherited from Scene7\Helpers\Html\AbstractTag
getAttributes(), hasAttribute(), renderAttributes(), setAttribute(), setAttributes(), setClass(), setId(), setStyle(), setTitle()
Properties summary
protected $image
#
protected array $sources
# []
Properties inherited from Scene7\Helpers\Html\AbstractTag
$attributes
API documentation generated by ApiGen