Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
PFTree Class Reference

Public Member Functions

 __construct ( $curTitle)
 
 addChild ( $child)
 
 getLastNodeForLevel ( $level)
 

Static Public Member Functions

static newFromWikiText ( $wikitext)
 
static newFromTopCategory ( $top_category)
 

Public Attributes

 $title
 
 $children
 

Detailed Description

A class that defines a tree - and can populate it based on either wikitext or a category structure.

Author
Yaron Koren

Member Function Documentation

◆ newFromTopCategory()

static PFTree::newFromTopCategory (   $top_category)
static
Parameters
string$top_category
Returns
mixed

◆ newFromWikiText()

static PFTree::newFromWikiText (   $wikitext)
static

Turn a manually-created "structure", defined as a bulleted list in wikitext, into a tree. This is based on the concept originated by the "menuselect" input type in the Semantic Forms Inputs extension - the difference here is that the text is manually parsed, instead of being run through the MediaWiki parser.

Parameters
string$wikitext
Returns
self

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

About | General disclaimer | Privacy policy