MediaWiki  master
ContentParseParams.php
Go to the documentation of this file.
1 <?php
3 
5 use ParserOptions;
6 
13  private $page;
14 
16  private $revId;
17 
19  private $parserOptions;
20 
22  private $generateHtml;
23 
24  public function __construct(
26  int $revId = null,
28  bool $generateHtml = true
29  ) {
30  $this->page = $page;
31  $this->parserOptions = $parserOptions ?? ParserOptions::newCanonical( 'canonical' );
32  $this->revId = $revId;
33  $this->generateHtml = $generateHtml;
34  }
35 
40  public function getPage(): PageReference {
41  return $this->page;
42  }
43 
48  public function getRevId(): ?int {
49  return $this->revId;
50  }
51 
56  public function getParserOptions(): ParserOptions {
57  return $this->parserOptions;
58  }
59 
64  public function getGenerateHtml(): bool {
65  return $this->generateHtml;
66  }
67 }
ParserOptions
Set options of the Parser.
Definition: ParserOptions.php:45
MediaWiki\Content\Renderer\ContentParseParams\getRevId
getRevId()
Definition: ContentParseParams.php:48
MediaWiki\Content\Renderer\ContentParseParams\getPage
getPage()
Definition: ContentParseParams.php:40
MediaWiki\Content\Renderer\ContentParseParams\getGenerateHtml
getGenerateHtml()
Definition: ContentParseParams.php:64
MediaWiki\Content\Renderer\ContentParseParams\$generateHtml
bool $generateHtml
Definition: ContentParseParams.php:22
MediaWiki\Content\Renderer\ContentParseParams\$parserOptions
ParserOptions $parserOptions
Definition: ContentParseParams.php:19
Page\PageReference
Interface for objects (potentially) representing a page that can be viewable and linked to on a wiki.
Definition: PageReference.php:49
MediaWiki\Content\Renderer\ContentParseParams
Definition: ContentParseParams.php:11
MediaWiki\Content\Renderer
Definition: ContentParseParams.php:2
MediaWiki\Content\Renderer\ContentParseParams\getParserOptions
getParserOptions()
Definition: ContentParseParams.php:56
ParserOptions\newCanonical
static newCanonical( $context, $userLang=null)
Creates a "canonical" ParserOptions object.
Definition: ParserOptions.php:1089
MediaWiki\Content\Renderer\ContentParseParams\__construct
__construct(PageReference $page, int $revId=null, ParserOptions $parserOptions=null, bool $generateHtml=true)
Definition: ContentParseParams.php:24
MediaWiki\Content\Renderer\ContentParseParams\$page
PageReference $page
Definition: ContentParseParams.php:13
MediaWiki\Content\Renderer\ContentParseParams\$revId
int null $revId
Definition: ContentParseParams.php:16