Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4135141
DatabaseHeadingItem.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
DatabaseHeadingItem.php
View Options
<?php
namespace
MediaWiki\Extension\DiscussionTools\ThreadItem
;
use
MediaWiki\Page\ProperPageIdentity
;
use
MediaWiki\Revision\RevisionRecord
;
class
DatabaseHeadingItem
extends
DatabaseThreadItem
implements
HeadingItem
{
use
HeadingItemTrait
;
private
bool
$placeholderHeading
;
private
int
$headingLevel
;
// Placeholder headings must have a level higher than real headings (1-6)
private
const
PLACEHOLDER_HEADING_LEVEL
=
99
;
/**
* @param ProperPageIdentity $page
* @param RevisionRecord $rev
* @param string $name
* @param string $id
* @param DatabaseThreadItem|null $parent
* @param bool|string $transcludedFrom
* @param int $level
* @param ?int $headingLevel Heading level (1-6). Use null for a placeholder heading.
*/
public
function
__construct
(
ProperPageIdentity
$page
,
RevisionRecord
$rev
,
string
$name
,
string
$id
,
?
DatabaseThreadItem
$parent
,
$transcludedFrom
,
int
$level
,
?
int
$headingLevel
)
{
parent
::
__construct
(
$page
,
$rev
,
'heading'
,
$name
,
$id
,
$parent
,
$transcludedFrom
,
$level
);
$this
->
placeholderHeading
=
$headingLevel
===
null
;
$this
->
headingLevel
=
$this
->
placeholderHeading
?
static
::
PLACEHOLDER_HEADING_LEVEL
:
$headingLevel
;
}
/**
* @inheritDoc
*/
public
function
getHeadingLevel
():
int
{
return
$this
->
headingLevel
;
}
/**
* @inheritDoc
*/
public
function
isPlaceholderHeading
():
bool
{
return
$this
->
placeholderHeading
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Aug 19, 12:59 (3 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
57/35/7cc25c1e3351b5b3950e1df5946b
Default Alt Text
DatabaseHeadingItem.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment