Semantic MediaWiki and related extensions
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Lingo\Element Class Reference

Public Member Functions

 __construct (&$term, &$definition)
 
 addDefinition (&$definition)
 
 getFormattedTerm (DOMDocument &$doc)
 
 getFormattedDefinitions ()
 
 getId ()
 

Public Attributes

const ELEMENT_TERM = 0
 
const ELEMENT_DEFINITION = 1
 
const ELEMENT_SOURCE = 2
 
const ELEMENT_LINK = 3
 
const ELEMENT_STYLE = 4
 
const ELEMENT_FIELDCOUNT = 5
 
const LINK_TEMPLATE_ID = 'LingoLink'
 

Protected Member Functions

 buildFormattedTermAsLink (DOMDocument &$doc)
 
 buildFormattedTermAsTooltip (DOMDocument &$doc)
 
 getClassesForLink ( $descriptor)
 
 buildFormattedDefinitions ()
 
 getDescriptorFromLinkTarget ( $linkTarget)
 
 isValidLinkTarget ( $linkTarget)
 
 addErrorMessageForInvalidLink ( $link)
 

Detailed Description

This class represents a term-definition pair. One term may be related to several definitions.

Constructor & Destructor Documentation

◆ __construct()

Lingo\Element::__construct ( $term,
$definition 
)

Lingo constructor.

Parameters
string$term
string[]$definition

Member Function Documentation

◆ addDefinition()

Lingo\Element::addDefinition ( $definition)
Parameters
array$definition

◆ addErrorMessageForInvalidLink()

Lingo\Element::addErrorMessageForInvalidLink (   $link)
protected
Parameters
$link

◆ buildFormattedTermAsLink()

Lingo\Element::buildFormattedTermAsLink ( DOMDocument &  $doc)
protected
Parameters
DOMDocument$doc
Returns
DOMElement

◆ buildFormattedTermAsTooltip()

Lingo\Element::buildFormattedTermAsTooltip ( DOMDocument &  $doc)
protected
Parameters
DOMDocument$doc
Returns
DOMElement

◆ getClassesForLink()

Lingo\Element::getClassesForLink (   $descriptor)
protected
Parameters
$descriptor
Returns
string[]

◆ getDescriptorFromLinkTarget()

Lingo\Element::getDescriptorFromLinkTarget (   $linkTarget)
protected
Parameters
string$linkTarget
Returns
string[]

◆ getFormattedDefinitions()

Lingo\Element::getFormattedDefinitions ( )
Returns
string[]

◆ getFormattedTerm()

Lingo\Element::getFormattedTerm ( DOMDocument &  $doc)
Parameters
DOMDocument$doc
Returns
DOMElement|DOMText

◆ getId()

Lingo\Element::getId ( )
Returns
string

◆ isValidLinkTarget()

Lingo\Element::isValidLinkTarget (   $linkTarget)
protected
Parameters
string$linkTarget
Returns
bool

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

About | General disclaimer | Privacy policy