wiki.techinc.nl/includes/parser/Hook/ParserSectionCreateHook.php
DannyS712 b361cf7239 Update hook interfaces for recent additions and deprecations
Changes since the interfaces were generated:
5 hooks added:
* RevisionUndeleted
* ParserBeforePreprocess
* RollbackComplete
* HtmlCacheUpdaterAppendUrls
* HtmlCacheUpdaterVaryUrls

9 hooks deprecated:
* ArticleRevisionUndeleted
* ArticleRollbackComplete (soft deprecation)
* UndeleteShowRevision
* InternalParseBeforeSanitize
* ParserFetchTemplate
* ParserSectionCreate
* ParserPreSaveTransformComplete
* BeforeParserrenderImageGallery
* ParserBeforeTidy

Bug: T240307
Change-Id: Ib91b1d8e519e6cb3c74a6fe174fe2fd0103d6d30
2020-05-05 11:22:04 +10:00

31 lines
1 KiB
PHP

<?php
namespace MediaWiki\Hook;
use Parser;
/**
* @deprecated since 1.35
* @ingroup Hooks
*/
interface ParserSectionCreateHook {
/**
* This hook is called each time the parser creates a document section
* from wikitext. Use this to apply per-section modifications to HTML (like
* wrapping the section in a DIV). Caveat: DIVs are valid wikitext, and a DIV
* can begin in one section and end in another. Make sure your code can handle
* that case gracefully. See the EditSectionClearerLink extension for an example.
*
* @since 1.35
*
* @param Parser $parser Calling Parser instance
* @param int $section Section number, zero-based, but section 0 is usually empty
* @param string &$sectionContent Reference to the content of the section, which
* can be modified by the hook
* @param bool $showEditLinks Whether this section has an edit link
* @return bool|void True or no return value to continue or false to abort
*/
public function onParserSectionCreate( $parser, $section, &$sectionContent,
$showEditLinks
);
}