The basic HTML5Element that handles common Foundation things and HTML closing tags
- Extends
-
Children
-
Implements
Countable PHPFUI \Interfaces \Walkable Stringable - Traits
Constants |
Methods |
public __clone () |
public
__construct
(
string
$element
) Construct an object with the tag name, ie. DIV, SPAN, TEXTAREA, etc |
public
addAttribute
(
string
$attribute
,
string
$value
=
''
) :
PHPFUI Add an attribute the the object
|
public
addClass
(
string
$class
) :
PHPFUI Add a class to an object
|
public
addPHPClassName
() :
PHPFUI Adds the base PHP class name as a class to this object |
public
deleteAttribute
(
string
$attribute
) :
PHPFUI Deletes the passed attribute |
public
deleteAttributes
() :
PHPFUI Deletes all attributes |
public
deleteClass
(
string
$classToDelete
) :
PHPFUI Delete a class from the object |
public
disabled
() :
PHPFUI Disabled the element |
public
getAttribute
(
string
$attribute
) : ?
string
Get an attribute
|
public
getAttributes
() :
string
Returns the attribute strings. Attributes with values are returned as name/value pairs, |
public
getClass
() :
string
Returns the class attribute ready for insertion into an element. |
public
getClasses
() :
array
Returns all classes for the object |
public
getElement
() :
string
Return the type of the element |
public
getId
() :
string
Return the id of the object. Elements will not have an id unless this method is called. The id is returned as a string |
public
getIdAttribute
() :
string
Return the id attribute of the object as a name/value pair. If no id has been requested, and empty string is returned. |
public
getToolTip
(
string
$label
) Get the tool tip as a string
|
public
hasClass
(
string
$class
) :
bool
Return true if the class is present on the object |
public
hasId
() :
bool
Does this object have an id set already? |
public
hasToolTip
() :
bool
|
public
newId
() :
PHPFUI Assign a new id to this element. |
public
setAttribute
(
string
$attribute
,
string
$value
=
''
) :
PHPFUI Set the attribute overwriting the prior value
|
public
setConfirm
(
$text
) :
PHPFUI A simple way to set a confirm on click
|
public
setElement
(
$element
) :
PHPFUI You can set the element type if you need to morph it for some reason
|
public
setId
(
$id
) :
PHPFUI Set the base id of the object
|
public
setToolTip
(
$tip
) :
PHPFUI Set the tool tip. Can either be a ToolTip or a string. If it is a string, it will be converted to a ToolTip
|
public
toggleAnimate
(
PHPFUI Will toggle the provided element on click with the provided animation. |
public
toggleClass
(
PHPFUI Will toggle the class on the provided element on click. |
public
transferAttributes
(
PHPFUI Moves attributes into this object from the passed object |
public
transferClasses
(
PHPFUI Moves classes into this object from the passed object |
Methods |
protected getBody () : string |
protected getEnd () : string |
protected getStart () : string |
protected
upCastCopy
(
PHPFUI Clones the first object and fills it with properties from the second object |
Properties |
private array $attributes |
private array $classes |
private string $element |
private string $id |
private static array $masterId = [ 'Reveal' => 2 , 'Hidden' => 1 , 'AccordionMenu' => 1 , 'HTML5Element' => 2 , 'Input' => 1 , 'Callout' => 1 ] |
private bool $noEndTag |
private static array $noEndTags = [ 'area' => true , 'base' => true , 'br' => true , 'col' => true , 'command' => true , 'embed' => true , 'hr' => true , 'img' => true , 'input' => true , 'keygen' => true , 'link' => true , 'meta' => true , 'param' => true , 'source' => true , 'track' => true , 'wbr' => true ] |
private $tooltip |
Properties |
private static array $masterId = [ 'Reveal' => 2 , 'Hidden' => 1 , 'AccordionMenu' => 1 , 'HTML5Element' => 2 , 'Input' => 1 , 'Callout' => 1 ] |
private static array $noEndTags = [ 'area' => true , 'base' => true , 'br' => true , 'col' => true , 'command' => true , 'embed' => true , 'hr' => true , 'img' => true , 'input' => true , 'keygen' => true , 'link' => true , 'meta' => true , 'param' => true , 'source' => true , 'track' => true , 'wbr' => true ] |
Methods |