MediaWiki  master
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). More...
 
 preSaveTransform (Content $content, PageReference $page, UserIdentity $user, ParserOptions $parserOptions)
 Returns a Content object with pre-save transformations applied (or $content if no transformations apply). More...
 

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.

References $content, and Content\getContentHandler().

◆ 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.

References $content, and Content\getContentHandler().

Member Data Documentation

◆ $contentHandlerFactory

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

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