mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-28 10:11:45 +00:00
d5376e28fc
Change-Id: Ia266fc22b02af0edbb32f356b4e0d92fe3a4da5f
33 lines
762 B
PHP
33 lines
762 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools;
|
|
|
|
class HeadingItem extends ThreadItem {
|
|
private $placeholderHeading = false;
|
|
|
|
/**
|
|
* @param ImmutableRange $range
|
|
* @param bool $placeholderHeading Item doesn't correspond to a real heading (e.g. 0th section)
|
|
*/
|
|
public function __construct(
|
|
ImmutableRange $range, bool $placeholderHeading = false
|
|
) {
|
|
parent::__construct( 'heading', 0, $range );
|
|
$this->placeholderHeading = $placeholderHeading;
|
|
}
|
|
|
|
/**
|
|
* @return bool
|
|
*/
|
|
public function isPlaceholderHeading() : bool {
|
|
return $this->placeholderHeading;
|
|
}
|
|
|
|
/**
|
|
* @param bool $placeholderHeading
|
|
*/
|
|
public function setPlaceholderHeading( bool $placeholderHeading ) : void {
|
|
$this->placeholderHeading = $placeholderHeading;
|
|
}
|
|
}
|