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

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 ( )
Returns
string The "raw form" of the text that shall be displayed.

◆ isHtmlText()

isHtmlText ( )
Returns
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.

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

◆ renderWithCondition()

renderWithCondition ( )
See also
Text::render()

◆ setText()

setText ( string  $text,
bool  $text_is_html = true 
)

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

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

Field Documentation

◆ $text

$text = ''
protected

The text to be displayed.

◆ $text_is_html

$text_is_html = true
protected

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: