BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
BlueSpice\Content\Entity Class Reference
Inheritance diagram for BlueSpice\Content\Entity:
Collaboration diagram for BlueSpice\Content\Entity:

Public Member Functions

 __construct ($text, $modelId= '')
 
 getJsonData ()
 
 isValid ()
 
 beautifyJSON ()
 
 preSaveTransform (\Title $title,\User $user,\ParserOptions $popts)
 
- Public Member Functions inherited from JsonContent
 __construct ($text, $modelId=CONTENT_MODEL_JSON)
 
 getJsonData ()
 
 getData ()
 
 isValid ()
 
 beautifyJSON ()
 
 preSaveTransform (Title $title, User $user, ParserOptions $popts)
 
- Public Member Functions inherited from TextContent
 __construct ($text, $model_id=CONTENT_MODEL_TEXT)
 
 copy ()
 
 getTextForSummary ($maxlength=250)
 
 getSize ()
 
 isCountable ($hasLinks=null)
 
 getNativeData ()
 
 getTextForSearchIndex ()
 
 getWikitextForTransclusion ()
 
 preSaveTransform (Title $title, User $user, ParserOptions $popts)
 
 diff (Content $that, Language $lang=null)
 
 convert ($toModel, $lossy= '')
 
- Public Member Functions inherited from AbstractContent
 __construct ($modelId=null)
 
 getModel ()
 
 getContentHandler ()
 
 getDefaultFormat ()
 
 getSupportedFormats ()
 
 isSupportedFormat ($format)
 
 serialize ($format=null)
 
 isEmpty ()
 
 isValid ()
 
 equals (Content $that=null)
 
 getSecondaryDataUpdates (Title $title, Content $old=null, $recursive=true, ParserOutput $parserOutput=null)
 
 getRedirectChain ()
 
 getRedirectTarget ()
 
 getUltimateRedirectTarget ()
 
 isRedirect ()
 
 updateRedirect (Title $target)
 
 getSection ($sectionId)
 
 replaceSection ($sectionId, Content $with, $sectionTitle= '')
 
 preSaveTransform (Title $title, User $user, ParserOptions $popts)
 
 addSectionHeader ($header)
 
 preloadTransform (Title $title, ParserOptions $popts, $params=[])
 
 prepareSave (WikiPage $page, $flags, $parentRevId, User $user)
 
 getDeletionUpdates (WikiPage $page, ParserOutput $parserOutput=null)
 
 matchMagicWord (MagicWord $word)
 
 convert ($toModel, $lossy= '')
 
 getParserOutput (Title $title, $revId=null, ParserOptions $options=null, $generateHtml=true)
 

Static Public Member Functions

static generateID (\BlueSpice\Entity $entity)
 
- Static Public Member Functions inherited from TextContent
static normalizeLineEndings ($text)
 

Protected Member Functions

 fillParserOutput (\Title $title, $revId,\ParserOptions $options, $generateHtml,\ParserOutput &$output)
 
 objectTable ($mapping)
 
 objectRow ($key, $val)
 
- Protected Member Functions inherited from JsonContent
 fillParserOutput (Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output)
 
 rootValueTable ($val)
 
 objectTable ($mapping)
 
 objectRow ($key, $val)
 
 arrayTable ($mapping)
 
 arrayRow ($val)
 
 valueCell ($val)
 
 primitiveValue ($val)
 
- Protected Member Functions inherited from TextContent
 fillParserOutput (Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output)
 
 getHtml ()
 
 getHighlightHtml ()
 
- Protected Member Functions inherited from AbstractContent
 checkModelID ($modelId)
 
 checkFormat ($format)
 
 fillParserOutput (Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output)
 

Additional Inherited Members

- Protected Attributes inherited from JsonContent
 $jsonParse
 
- Protected Attributes inherited from TextContent
 $mText
 
- Protected Attributes inherited from AbstractContent
 $model_id
 

Member Function Documentation

BlueSpice\Content\Entity::beautifyJSON ( )

Pretty-print JSON

Returns
bool|null|string
BlueSpice\Content\Entity::fillParserOutput ( \Title  $title,
  $revId,
\ParserOptions  $options,
  $generateHtml,
\ParserOutput $output 
)
protected

Set the HTML and add the appropriate styles

Parameters
\Title$title
int$revId
\ParserOptions$options
bool$generateHtml
\ParserOutput$output
static BlueSpice\Content\Entity::generateID ( \BlueSpice\Entity  $entity)
static

Returns a generated id for a given entity.

Parameters
\BlueSpice\Entity$entity
Returns
int
BlueSpice\Content\Entity::getJsonData ( )

Decodes the JSON into a PHP associative array.

Returns
array
BlueSpice\Content\Entity::isValid ( )
Returns
bool Whether content is valid JSON.

Implements Content.

BlueSpice\Content\Entity::objectRow (   $key,
  $val 
)
protected

Constructs HTML representation of a single key-value pair.

Parameters
string$key
mixed$val
Returns
string HTML.
BlueSpice\Content\Entity::objectTable (   $mapping)
protected

Constructs an HTML representation of a JSON object.

Parameters
array$mapping
Returns
string HTML
BlueSpice\Content\Entity::preSaveTransform ( \Title  $title,
\User  $user,
\ParserOptions  $popts 
)

Beautifies JSON prior to save.

Parameters
\Title$titleTitle
\User$userUser
ParserOptions$popts
Returns
JsonContent

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