Methods summary
public static
Nette\Utils\Html
|
#
el( string $name = NULL, array|string $attrs = NULL )
Static factory.
Parameters
- $name
string element name (or NULL)
- $attrs
array|string element's attributes or plain text content
Returns
|
public
Nette\Utils\Html
|
#
setName( string $name, boolean $isEmpty = NULL )
Changes element's name.
Parameters
- $name
string
- $isEmpty
boolean Is element empty?
Returns
Throws
|
public
string
|
#
getName( )
Returns element's name.
Returns
string
|
public
boolean
|
#
isEmpty( )
Is element empty?
Returns
boolean
|
public
Nette\Utils\Html
|
#
addAttributes( array $attrs )
Sets multiple attributes.
Sets multiple attributes.
Parameters
Returns
|
public
|
#
__set( string $name, mixed $value )
Overloaded setter for element's attribute.
Overloaded setter for element's attribute.
Parameters
- $name
string HTML attribute name
- $value
mixed HTML attribute value
Throws
MemberAccessException if the property is not defined or is read-only
Overrides
|
public
mixed
&
|
#
__get( string $name )
Overloaded getter for element's attribute.
Overloaded getter for element's attribute.
Parameters
- $name
string HTML attribute name
Returns
mixed HTML attribute value
Throws
MemberAccessException if the property is not defined.
Overrides
|
public
boolean
|
#
__isset( string $name )
Overloaded tester for element's attribute.
Overloaded tester for element's attribute.
Parameters
- $name
string HTML attribute name
Returns
boolean
Overrides
|
public
|
#
__unset( string $name )
Overloaded unsetter for element's attribute.
Overloaded unsetter for element's attribute.
Parameters
- $name
string HTML attribute name
Throws
MemberAccessException
Overrides
|
public
Nette\Utils\Html
|
#
__call( string $m, array $args )
Overloaded setter for element's attribute.
Overloaded setter for element's attribute.
Parameters
- $m
string HTML attribute name
- $args
array (string) HTML attribute value or pair?
Returns
Throws
MemberAccessException
Overrides
|
public
Nette\Utils\Html
|
#
href( string $path, array $query = NULL )
Special setter for element's attribute.
Special setter for element's attribute.
Parameters
- $path
string path
- $query
array query
Returns
|
public
Nette\Utils\Html
|
#
setHtml( string $html )
Sets element's HTML content.
Sets element's HTML content.
Parameters
- $html
string raw HTML string
Returns
Throws
|
public
string
|
#
getHtml( )
Returns element's HTML content.
Returns element's HTML content.
Returns
string
|
public
Nette\Utils\Html
|
#
setText( string $text )
Sets element's textual content.
Sets element's textual content.
Parameters
Returns
Throws
|
public
string
|
#
getText( )
Returns element's textual content.
Returns element's textual content.
Returns
string
|
public
Nette\Utils\Html
|
#
add( Nette\Utils\Html |string $child )
Adds new element's child.
Adds new element's child.
Parameters
Returns
|
public
Nette\Utils\Html
|
#
create( string $name, array|string $attrs = NULL )
Creates and adds a new Html child.
Creates and adds a new Html child.
Parameters
- $name
string elements's name
- $attrs
array|string element's attributes or raw HTML string
Returns
|
public
Nette\Utils\Html
|
#
insert( integer|null $index, Nette\Utils\Html |string $child, boolean $replace = FALSE )
Inserts child node.
Parameters
- $index
integer|null position of NULL for appending
- $child
Nette\Utils\Html |string
Html node or raw HTML string
- $replace
boolean
Returns
Throws
|
public
|
#
offsetSet( integer|null $index, Nette\Utils\Html |string $child )
Inserts (replaces) child node (\ArrayAccess implementation).
Inserts (replaces) child node (\ArrayAccess implementation).
Parameters
- $index
integer|null position of NULL for appending
- $child
Nette\Utils\Html |string
Html node or raw HTML string
Implementation of
|
public
Nette\Utils\Html |string
|
#
offsetGet( integer $index )
Returns child node (\ArrayAccess implementation).
Returns child node (\ArrayAccess implementation).
Parameters
Returns
Implementation of
|
public
boolean
|
#
offsetExists( integer $index )
Exists child node? (\ArrayAccess implementation).
Exists child node? (\ArrayAccess implementation).
Parameters
Returns
boolean
Implementation of
|
public
|
#
offsetUnset( integer $index )
Removes child node (\ArrayAccess implementation).
Removes child node (\ArrayAccess implementation).
Parameters
Implementation of
|
public
integer
|
#
count( )
Returns children count.
Returns
integer
Implementation of
|
public
|
|
public
ArrayIterator
|
#
getIterator( )
Iterates over a elements.
Iterates over a elements.
Returns
Implementation of
|
public
array
|
|
public
string
|
#
render( integer $indent = NULL )
Renders element's start tag, content and end tag.
Renders element's start tag, content and end tag.
Parameters
Returns
string
|
public
string
|
#
__toString( )
Returns
string in HTML format
Implementation of
|
public
string
|
#
startTag( )
Returns element's start tag.
Returns element's start tag.
Returns
string
|
public
string
|
#
endTag( )
Returns element's end tag.
Returns element's end tag.
Returns
string
|
public
|
|
Properties summary
public
array
|
$attrs
|
array() |
|
protected
array
|
$children
|
array() |
|
public static
boolean
|
$xhtml
|
FALSE |
|
public static
array
|
$emptyElements
|
array(
'img' => 1, 'hr' => 1, 'br' => 1, 'input' => 1, 'meta' => 1, 'area' => 1, 'embed' => 1, 'keygen' => 1,
'source' => 1, 'base' => 1, 'col' => 1, 'link' => 1, 'param' => 1, 'basefont' => 1, 'frame' => 1,
'isindex' => 1, 'wbr' => 1, 'command' => 1, 'track' => 1,
) |
|