Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5983782
ParsoidAnchorFormatter.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ParsoidAnchorFormatter.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Cite\Parsoid
;
use
Cite\AnchorFormatter
;
/**
* Contains small pieces of additional knowledge that is specific to the Parsoid implementation and
* doesn't belong to the generic {@see AnchorFormatter}.
*
* @license GPL-2.0-or-later
*/
class
ParsoidAnchorFormatter
{
/**
* The clickable href="#…" link and id="…" target to jump from a footnote marker in the article
* down to the corresponding "note" item in the reference list.
*/
public
static
function
getNoteIdentifier
(
RefGroupItem
$ref
):
string
{
return
AnchorFormatter
::
getNoteIdentifier
(
$ref
->
name
,
$ref
->
globalId
);
}
/**
* Identifier for the inner <span class="mw-reference-text"> node.
*/
public
static
function
getNoteTextIdentifier
(
RefGroupItem
$ref
):
string
{
return
AnchorFormatter
::
getNoteTextIdentifier
(
$ref
->
name
,
$ref
->
globalId
);
}
/**
* The clickable href="#…" backlink and id="…" target to jump from the reference list back up to
* one of the possibly many footnote markers in the article.
*/
public
static
function
getBackLinkIdentifier
(
RefGroupItem
$ref
,
?
int
$count
=
null
):
string
{
return
AnchorFormatter
::
getBackLinkIdentifier
(
$ref
->
name
,
$ref
->
globalId
,
$count
??
$ref
->
visibleNodes
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 23:01 (1 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
fd/21/d3bddfd597c9e01e1633743dcf59
Default Alt Text
ParsoidAnchorFormatter.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment