Podręcznik:$wgContentHandlerTextFallback
Content Models and Handlers |
---|
MediaWiki allows for page content types other than wikitext. It offers built-in support for JavaScript, CSS, JSON and plain text. Extensions can use MediaWiki's ContentHandler mechanism to add new content models for accepting different formats and controlling how they are rendered, stored and edited. |
![]() |
![]() |
![]() |
Support and development
|
![]() | Ta przestarzała funkcja nie powinna być już dłużej używana, ale jest nadal dostępna ze względu na wsteczną kompatybilność. Ta funkcja została zdeprecjonowana w wersji 1.37.0. |
Content handlers and storage: $wgContentHandlerTextFallback | |
---|---|
How to react if a plain text version of a non-text Content object is requested using ContentHandler::getContentText() |
|
Wprowadzono w wersji: | 1.21.0 |
Przestarzałe w wersji: | 1.37.0 (Gerrit change 691704; git #e34e93f2) |
Usunięto w wersji: | nadal w użyciu |
Dozwolone wartości: | (one of the allowed parameters) |
Domyślna wartość: | 'ignore' |
Inne ustawienia: Alfabetycznie | Według funkcji |
Dozwolone parametry
Depending on the value, the following action is taken when Content is not a TextContent object:
'ignore'
-ContentHandler::getContentText()
returns null'fail'
- Throw an MWException'serialize'
- Use the Content objectsserialize
method to get a string