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

Public Member Functions

 getModules ()
 
 getModuleStyles ()
 
 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.
 

Static Public Member Functions

static byName (string $name)
 Return the Mode object with the given name, or null if the name is invalid.
 

Protected Member Functions

 __construct (string $name)
 Construct a (singleton) mode.
 

Protected Attributes

 $mode
 

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Parsoid\Ext\Gallery\Mode::__construct ( string $name)
protected

Construct a (singleton) mode.

Parameters
string$nameThe name of this mode, all lowercase.

Member Function Documentation

◆ byName()

static Wikimedia\Parsoid\Ext\Gallery\Mode::byName ( string $name)
static

Return the Mode object with the given name, or null if the name is invalid.

Parameters
string$name
Returns
Mode|null

◆ dimensions()

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

Format the dimensions as a string.

Reimplemented in Wikimedia\Parsoid\Ext\Gallery\PackedMode, and Wikimedia\Parsoid\Ext\Gallery\TraditionalMode.

◆ render()

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

Render HTML for the given lines in this mode.

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

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


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