MediaWiki REL1_37
MediaWiki\Content\Transform\ContentTransformer Class Reference

A service to transform content. More...

Collaboration diagram for MediaWiki\Content\Transform\ContentTransformer:

Public Member Functions

 __construct (IContentHandlerFactory $contentHandlerFactory)
 
 preloadTransform (Content $content, PageReference $page, ParserOptions $parserOptions, array $params=[])
 Returns a Content object with preload transformations applied (or $content if no transformations apply).
 
 preSaveTransform (Content $content, PageReference $page, UserIdentity $user, ParserOptions $parserOptions)
 Returns a Content object with pre-save transformations applied (or $content if no transformations apply).
 

Private Attributes

IContentHandlerFactory $contentHandlerFactory
 

Detailed Description

A service to transform content.

Since
1.37

Definition at line 15 of file ContentTransformer.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Content\Transform\ContentTransformer::__construct ( IContentHandlerFactory  $contentHandlerFactory)
Parameters
IContentHandlerFactory$contentHandlerFactory

Definition at line 22 of file ContentTransformer.php.

References MediaWiki\Content\Transform\ContentTransformer\$contentHandlerFactory.

Member Function Documentation

◆ preloadTransform()

MediaWiki\Content\Transform\ContentTransformer::preloadTransform ( Content  $content,
PageReference  $page,
ParserOptions  $parserOptions,
array  $params = [] 
)

Returns a Content object with preload transformations applied (or $content if no transformations apply).

Parameters
Content$content
PageReference$page
ParserOptions$parserOptions
array$params
Returns
Content

Definition at line 60 of file ContentTransformer.php.

◆ preSaveTransform()

MediaWiki\Content\Transform\ContentTransformer::preSaveTransform ( Content  $content,
PageReference  $page,
UserIdentity  $user,
ParserOptions  $parserOptions 
)

Returns a Content object with pre-save transformations applied (or $content if no transformations apply).

Parameters
Content$content
PageReference$page
UserIdentity$user
ParserOptions$parserOptions
Returns
Content

Definition at line 37 of file ContentTransformer.php.

Member Data Documentation

◆ $contentHandlerFactory

IContentHandlerFactory MediaWiki\Content\Transform\ContentTransformer::$contentHandlerFactory
private

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