class Html

HTML Helper Functions

Methods

string
close_tag(string $tag_name)

Returns the specified closing tag

string
content_tag(string $tag_name, string $content = "", array $tag_attributes = [], array $options = [])

Helper function to create HTML tags with content (e.g. CONTENT)

string
open_tag(string $tag_name, array $tag_attributes = [])

Helper function to open a HTML tag (e.g.

)

string
tag(string $tag_name, array $tag_attributes = [])

Helper function to create HTML tags without content (e.g. <input ... />)

Details

at line 90
string close_tag(string $tag_name)

Returns the specified closing tag

Parameters

string $tag_name

Tag Name which should be closed

Return Value

string

Returns a string with the matching close tag (e.g. )

at line 42
string content_tag(string $tag_name, string $content = "", array $tag_attributes = [], array $options = [])

Helper function to create HTML tags with content (e.g. CONTENT)

Parameters

string $tag_name

Name of the TAG, e.g. input

string $content

Content which shall be placed in tag

array $tag_attributes

Assoc-Array with HTML Attribute Name and Attribute Value ['value'=>'123']

array $options

Additional options, supported: 'close_tag'=>false to prevent adding a closing tag.

Return Value

string

Returns the final HTML tag

at line 28
string open_tag(string $tag_name, array $tag_attributes = [])

Helper function to open a HTML tag (e.g.

)

Parameters

string $tag_name

Name of the TAG, e.g. input

array $tag_attributes

Assoc-Array with HTML Attribute Name and Attribute Value ['value'=>'123']

Return Value

string

Returns the final HTML tag

at line 18
string tag(string $tag_name, array $tag_attributes = [])

Helper function to create HTML tags without content (e.g. <input ... />)

Parameters

string $tag_name

Name of the TAG, e.g. input

array $tag_attributes

Assoc-Array with HTML Attribute Name and Attribute Value ['value'=>'123']

Return Value

string

Returns the final HTML tag