Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\Ext\Gallery\TraditionalMode Class Reference
+ Inheritance diagram for Wikimedia\Parsoid\Ext\Gallery\TraditionalMode:
+ Collaboration diagram for Wikimedia\Parsoid\Ext\Gallery\TraditionalMode:

Public Member Functions

 dimensions (Opts $opts)
 Format the dimensions as a string.
 
 render (ParsoidExtensionAPI $extApi, Opts $opts, ?DocumentFragment $caption, array $lines)
 Render HTML for the given lines in this mode.
Parameters
ParsoidExtensionAPI$extApi
Opts$opts
?DocumentFragment$caption
ParsedLine[]$lines
Returns
DocumentFragment

 
 getModuleStyles ()
 
- Public Member Functions inherited from Wikimedia\Parsoid\Ext\Gallery\Mode
 getModules ()
 

Protected Member Functions

 __construct (?string $mode=null)
 Create a TraditionalMode singleton.
 
 perRow (Opts $opts, Element $ul)
 
 setAdditionalOptions (Opts $opts, Element $ul)
 
 scaleMedia (Opts $opts, Element $wrapper)
 
 thumbWidth ( $width)
 
 thumbHeight ( $height)
 
 thumbStyle ( $width, $height, bool $hasError)
 
 boxWidth ( $width)
 
 boxStyle ( $width, $height)
 
 galleryText (Document $doc, Element $box, ?Element $gallerytext, float $width)
 
- Protected Member Functions inherited from Wikimedia\Parsoid\Ext\Gallery\Mode
 __construct (string $name)
 Construct a (singleton) mode.
 

Protected Attributes

 $scale
 
 $padding
 
- Protected Attributes inherited from Wikimedia\Parsoid\Ext\Gallery\Mode
 $mode
 

Additional Inherited Members

- Static Public Member Functions inherited from Wikimedia\Parsoid\Ext\Gallery\Mode
static byName (string $name)
 Return the Mode object with the given name, or null if the name is invalid.
 

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Parsoid\Ext\Gallery\TraditionalMode::__construct ( ?string $mode = null)
protected

Member Function Documentation

◆ boxStyle()

Wikimedia\Parsoid\Ext\Gallery\TraditionalMode::boxStyle ( $width,
$height )
protected
Parameters
float | int$width
float | int$height
Returns
string

◆ boxWidth()

Wikimedia\Parsoid\Ext\Gallery\TraditionalMode::boxWidth ( $width)
protected
Parameters
float | int$width
Returns
float|int

◆ dimensions()

Wikimedia\Parsoid\Ext\Gallery\TraditionalMode::dimensions ( Opts $opts)

Format the dimensions as a string.

Reimplemented from Wikimedia\Parsoid\Ext\Gallery\Mode.

Reimplemented in Wikimedia\Parsoid\Ext\Gallery\PackedMode.

◆ galleryText()

Wikimedia\Parsoid\Ext\Gallery\TraditionalMode::galleryText ( Document $doc,
Element $box,
?Element $gallerytext,
float $width )
protected

◆ getModuleStyles()

Wikimedia\Parsoid\Ext\Gallery\TraditionalMode::getModuleStyles ( )

◆ perRow()

Wikimedia\Parsoid\Ext\Gallery\TraditionalMode::perRow ( Opts $opts,
Element $ul )
protected

◆ render()

Wikimedia\Parsoid\Ext\Gallery\TraditionalMode::render ( ParsoidExtensionAPI $extApi,
Opts $opts,
?DocumentFragment $caption,
array $lines )

Render HTML for the given lines in this mode.

Parameters
ParsoidExtensionAPI$extApi
Opts$opts
?DocumentFragment$caption
ParsedLine[]$lines
Returns
DocumentFragment

Reimplemented from Wikimedia\Parsoid\Ext\Gallery\Mode.

◆ scaleMedia()

Wikimedia\Parsoid\Ext\Gallery\TraditionalMode::scaleMedia ( Opts $opts,
Element $wrapper )
protected
Parameters
Opts$opts
Element$wrapper
Returns
int|float

Reimplemented in Wikimedia\Parsoid\Ext\Gallery\PackedMode.

◆ setAdditionalOptions()

Wikimedia\Parsoid\Ext\Gallery\TraditionalMode::setAdditionalOptions ( Opts $opts,
Element $ul )
protected

◆ thumbHeight()

Wikimedia\Parsoid\Ext\Gallery\TraditionalMode::thumbHeight ( $height)
protected
Parameters
float | int$height
Returns
float|int

◆ thumbStyle()

Wikimedia\Parsoid\Ext\Gallery\TraditionalMode::thumbStyle ( $width,
$height,
bool $hasError )
protected
Parameters
float | int$width
float | int$height
bool$hasError
Returns
string

◆ thumbWidth()

Wikimedia\Parsoid\Ext\Gallery\TraditionalMode::thumbWidth ( $width)
protected
Parameters
float | int$width
Returns
float|int

The documentation for this class was generated from the following file: