2020-05-22 16:26:05 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools;
|
|
|
|
|
|
|
|
class HeadingItem extends ThreadItem {
|
|
|
|
private $placeholderHeading = false;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param ImmutableRange $range
|
2020-06-25 12:23:17 +00:00
|
|
|
* @param bool $placeholderHeading Item doesn't correspond to a real heading (e.g. 0th section)
|
2020-05-22 16:26:05 +00:00
|
|
|
*/
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|