Manual:ContentHandler.php

From Linux Web Expert

Revision as of 08:12, 12 January 2024 by imported>Cavila (Even the 'new' method is deprecated. Replace with list of public methods.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ContentHandler.php contains the ContentHandler class, the base interface for content handling. This file has been available since MediaWiki 1.21 .

Public methods

  • makeContent() - create a Content object from given textual representation. Text will be deserialized according to given content model.
  • getLocalizedName()
  • serializeContent()
  • exportTransform()
  • unserializeContent()
  • importTransform()
  • makeEmptyContent()
  • makeRedirectContent()
  • getModelID()
  • getSupportedFormats()
  • getDefaultFormat()
  • isSupportedFormat()
  • getActionOverrides()
  • createDifferenceEngine()
  • getSlotDiffRenderer()
  • getPageLanguage()
  • getPageViewLanguage()
  • canBeUsedOn()
  • merge3()
  • getLanguageConverter()
  • getAutosummary()
  • getChangeTag()
  • getAutoDeleteReason()
  • isParserCacheSupported()
  • supportsSections()
  • supportsCategories()
  • supportsRedirects()
  • supportsDirectEditing()
  • supportsPreloadContent()
  • generateHTMLOnEdit()
  • supportsDirectApiEditing()
  • getFieldsForSearchIndex()
  • getDataForSearchIndex()
  • getParserOutputForIndexing()
  • getSecondaryDataUpdates()
  • getDeletionUpdates()
  • preSaveTransform()
  • preloadTransform()
  • validateSave()
  • getParserOutput() - produce a page output suitable for indexing, typically used with getDataForSearchIndex(). Since 1.38
  • fillParserOutputInternal - since 1.38

Deprecated

  • getContentText() - get flat text from a Content object. Deprecated since 1.37 in favour of Content::getText() for TextContent instances.
  • getDefaultModelFor() - deprecated in favour of SlotRoleHandler::getDefaultModel().
  • getForTitle()
  • getForContent()
  • getForModelID()
  • getContentModels() - deprecated since 1.35 in favour of ContentHandlerFactory::getContentModels()
  • getAllContentFormats() - deprecated since 1.35

See also