Stud.IP  5.4
Text Class Reference
Inheritance diagram for Text:

Public Member Functions

 setText (string $text, bool $text_is_html=true)
 getText ()
 isHtmlText ()
 render ()
 renderWithCondition ()
- Public Member Functions inherited from Part
 __construct (... $parts)
 setContextObject ($object)
 getContextObject ()
 addPart (Part $part)
 addInput (Input $input)
 addText (string $text, bool $text_is_html=true)
 addLink (string $title, string $url, ?\Icon $icon=null, array $attributes=[])
 render ()
 renderWithCondition ()
 getAllInputs ()
 setParent (Part $parent)
 setIfCondition ($if)
 getInputFromArray (array $data)

Protected Attributes

 $text = ''
 $text_is_html = true
- Protected Attributes inherited from Part
 $parent = null
 $contextobject = null
 $parts = []

Additional Inherited Members

- Data Fields inherited from Part
 $if = null

Detailed Description

The Text class represents a part of a form that just displays text. The text can either be HTML or unformatted text.

Member Function Documentation

◆ getText()

getText ( )
string The "raw form" of the text that shall be displayed.

◆ isHtmlText()

isHtmlText ( )
bool Whether the text is HTML (true) or not (false).

◆ render()

render ( )

"Renders" the text: Either return it directly, if it is HTML or call htmlReady first before returning it.

string The text that shall be placed in the form, either as HTML or plain text.

◆ renderWithCondition()

renderWithCondition ( )
See also

◆ setText()

setText ( string  $text,
bool  $text_is_html = true 

Sets the text that shall be displayed in this form part.

string$textThe text to be displayed.
bool$text_is_htmlWhether the text is HTML (true) or plain text. Defaults to true.
$this This form part.

Field Documentation

◆ $text

$text = ''

The text to be displayed.

◆ $text_is_html

$text_is_html = true

This attribute defines whether to interpret the text as HTML (true) or as plain text (false).

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