Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\EditEntity\MediaWikiEditFilterHookRunner Class Reference

Class to run the MediaWiki EditFilterMergedContent hook. More...

+ Inheritance diagram for Wikibase\Repo\EditEntity\MediaWikiEditFilterHookRunner:
+ Collaboration diagram for Wikibase\Repo\EditEntity\MediaWikiEditFilterHookRunner:

Public Member Functions

 __construct (EntityNamespaceLookup $namespaceLookup, EntityTitleStoreLookup $titleLookup, EntityContentFactory $entityContentFactory, HookContainer $hookContainer)
 
 run ( $new, IContextSource $context, string $summary)
 Call EditFilterMergedContent hook, if registered.
 

Private Member Functions

 getContextForEditFilter (IContextSource $context, ?EntityId $entityId, string $entityType)
 

Private Attributes

 $namespaceLookup
 
 $titleLookup
 
 $entityContentFactory
 
 $hookContainer
 

Detailed Description

Class to run the MediaWiki EditFilterMergedContent hook.

Author
Addshore

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\EditEntity\MediaWikiEditFilterHookRunner::__construct ( EntityNamespaceLookup  $namespaceLookup,
EntityTitleStoreLookup  $titleLookup,
EntityContentFactory  $entityContentFactory,
HookContainer  $hookContainer 
)

Member Function Documentation

◆ getContextForEditFilter()

Wikibase\Repo\EditEntity\MediaWikiEditFilterHookRunner::getContextForEditFilter ( IContextSource  $context,
?EntityId  $entityId,
string  $entityType 
)
private

◆ run()

Wikibase\Repo\EditEntity\MediaWikiEditFilterHookRunner::run (   $new,
IContextSource  $context,
string  $summary 
)

Call EditFilterMergedContent hook, if registered.

Parameters
EntityDocument | EntityRedirect | EntityContent | null$newThe entity or redirect (content) we are trying to save
IContextSource$contextThe request context for the edit
string$summaryThe edit summary
Exceptions
RuntimeException
InvalidArgumentException
Returns
Status

Implements Wikibase\Repo\EditEntity\EditFilterHookRunner.

Member Data Documentation

◆ $entityContentFactory

Wikibase\Repo\EditEntity\MediaWikiEditFilterHookRunner::$entityContentFactory
private

◆ $hookContainer

Wikibase\Repo\EditEntity\MediaWikiEditFilterHookRunner::$hookContainer
private

◆ $namespaceLookup

Wikibase\Repo\EditEntity\MediaWikiEditFilterHookRunner::$namespaceLookup
private

◆ $titleLookup

Wikibase\Repo\EditEntity\MediaWikiEditFilterHookRunner::$titleLookup
private

The documentation for this class was generated from the following file: