คู่มือ:WikitextContent.php
MediaWiki file: WikitextContent.php | |
---|---|
Location: | includes/content/ |
Source code: | master • 1.41.1 • 1.40.3 • 1.39.7 |
Classes: | WikitextContent |
WikitextContent.php contains the Content object for wiki text pages. Extends TextContent .
ตัวอย่าง
This will edit a page called 'Foo' with the content 'Hello world' and summary 'Greetings' by the user 'WorldGreeter'.
$user = User::newSystemUser( 'WorldGreeter', [ 'steal' => true ] );
$page = WikiPage::factory( 'Foo' );
$content = new WikitextContent( 'Hello world' );
$success = $page->doEditContent ( $content, 'Greetings', 0, false, $user );