BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
Skins\Chameleon\Components\Component Class Reference
Inheritance diagram for Skins\Chameleon\Components\Component:

Public Member Functions

 __construct (ChameleonTemplate $template,\DOMElement $domElement=null, $indent=0)
 
 setClasses ($classes)
 
 addClasses ($classes)
 
 getSkinTemplate ()
 
 getSkin ()
 
 getIndent ()
 
 getClassString ()
 
 removeClasses ($classes)
 
 getDomElement ()
 
 getHtml ()
 
 getResourceLoaderModules ()
 

Protected Member Functions

 transformClassesToArray ($classes)
 
 indent ($indent=0)
 
 getAttribute ($attributeName, $default=null)
 

Detailed Description

Component class

This is the base class of all components.

Author
Stephan Gambke
Since
1.0

Constructor & Destructor Documentation

Skins\Chameleon\Components\Component::__construct ( ChameleonTemplate  $template,
\DOMElement  $domElement = null,
  $indent = 0 
)
Parameters
ChameleonTemplate$template
\DOMElement | null$domElement
int$indent

Member Function Documentation

Skins\Chameleon\Components\Component::addClasses (   $classes)

Adds the given class to the class string that should be assigned to the top-level html element of this component

Parameters
string  |  array  |  null$classes
Returns
string | array
Skins\Chameleon\Components\Component::getAttribute (   $attributeName,
  $default = null 
)
protected
Parameters
string$attributeName
null  |  string$default
Returns
null | string
Skins\Chameleon\Components\Component::getClassString ( )

Returns the class string that should be assigned to the top-level html element of this component

Returns
string
Skins\Chameleon\Components\Component::getDomElement ( )

Returns the DOMElement from the description XML file associated with this element.

Returns
Skins\Chameleon\Components\Component::getHtml ( )
abstract

Builds the HTML code for this component

Returns
String the HTML code
Skins\Chameleon\Components\Component::getIndent ( )

Returns the current indentation level

Returns
int
Skins\Chameleon\Components\Component::getResourceLoaderModules ( )
Returns
string[] the resource loader modules needed by this component
Skins\Chameleon\Components\Component::getSkin ( )
Since
1.1
Returns
SkinChameleon
Skins\Chameleon\Components\Component::getSkinTemplate ( )
Skins\Chameleon\Components\Component::indent (   $indent = 0)
protected

Adds $indent to (or subtracts from if negative) the current indentation level. Inserts a new line and a number of tabs according to the new indentation level.

Parameters
int$indent
Returns
string
Exceptions
\MWException
Skins\Chameleon\Components\Component::removeClasses (   $classes)

Removes the given class from the class string that should be assigned to the top-level html element of this component

Parameters
string  |  array  |  null$classes
Returns
string
Skins\Chameleon\Components\Component::setClasses (   $classes)

Sets the class string that should be assigned to the top-level html element of this component

Parameters
string  |  array  |  null$classes
Skins\Chameleon\Components\Component::transformClassesToArray (   $classes)
protected
Parameters
string  |  array  |  null$classes
Returns
array
Exceptions
\MWException

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