phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
BaseHtml Class Reference

BaseHtml for HTML components. More...

+ Inheritance diagram for BaseHtml:

Public Member Functions

 run (JsUtils $js)
 
 getTagName ()
 
 setTagName ($tagName)
 
 fromArray ($array)
 
 fromDatabaseObjects ($objects, $function)
 
 fromDatabaseObject ($object, $function)
 
 wrap ($before, $after="")
 
 getElementById ($identifier, $elements)
 
 getBsComponent ()
 
 setBsComponent ($bsComponent)
 
 compile (JsUtils $js=NULL, &$view=NULL)
 
 setDraggable ($attr="id", $dropZone=null, $parameters=[])
 Sets the element draggable, and eventualy defines the dropzone (HTML5 drag and drop)
 
 asDropZone ($jsCallback="", $jqueryDone="append", $parameters=[])
 Declares the element as a drop zone (HTML5 drag and drop)
 
 asFileDropZone ($responseElement=null, $url=null, $progress=null, $jsCallback="", $parameters=[])
 Declares the element as a drop zone for file uploading (HTML5 drag and drop)
 
 __toString ()
 
 onPostCompile ($callback)
 
 onPreCompile ($callback)
 
- Public Member Functions inherited from BaseWidget
 __construct ($identifier)
 
 getIdentifier ()
 
 setIdentifier ($identifier)
 
 getLibraryId ()
 
 setLibraryId ($_libraryId)
 
- Public Member Functions inherited from BaseHtmlEventsTrait
 addEvent ($event, $jsCode, $stopPropagation=false, $preventDefault=false)
 
 trigger ($event, $params="[]")
 
 jsTrigger ($event, $params="[this]")
 
 _addEvent ($event, $jsCode)
 
 on ($event, $jsCode, $stopPropagation=false, $preventDefault=false)
 
 onClick ($jsCode, $stopPropagation=false, $preventDefault=true)
 
 setClick ($jsCode)
 
 onCreate ($jsCode)
 
 addEventsOnRun (JsUtils $js=NULL)
 
 _ajaxOn ($operation, $event, $url, $responseElement="", $parameters=array())
 
 getOn ($event, $url, $responseElement="", $parameters=array())
 Performs a get to $url on the event $event on $element and display it in $responseElement.
 
 getOnClick ($url, $responseElement="", $parameters=array())
 Performs a get to $url on the click event on $element and display it in $responseElement.
 
 postOn ($event, $url, $params="{}", $responseElement="", $parameters=array())
 Performs a post to $url on the event $event on $element and display it in $responseElement.
 
 postOnClick ($url, $params="{}", $responseElement="", $parameters=array())
 Performs a post to $url on the click event on $element and display it in $responseElement.
 
 postFormOn ($event, $url, $form, $responseElement="", $parameters=array())
 Performs a post form with ajax.
 
 postFormOnClick ($url, $form, $responseElement="", $parameters=array())
 Performs a post form with ajax on click.
 
 jsDoJquery ($jqueryCall, $param="")
 
 executeOnRun ($jsCode)
 
 jsHtml ($content="")
 
 jsShow ()
 
 jsHide ()
 
 jsToggle ($value)
 
 getEvents ()
 
- Public Member Functions inherited from BaseHtmlPropertiesTrait
 getProperties ()
 
 setProperties ($properties)
 
 setProperty ($name, $value)
 
 getProperty ($name)
 
 addToProperty ($name, $value, $separator=" ")
 
 addProperties ($properties)
 
 removePropertyValue ($name, $value)
 
 addToPropertyCtrl ($name, $value, $typeCtrl)
 
 addToPropertyCtrlCheck ($name, $value, $typeCtrl)
 
 removeProperty ($name)
 
 propertyContains ($propertyName, $value)
 

Protected Member Functions

 getTemplate (JsUtils $js=NULL, $view=null)
 
 ctrl ($name, $value, $typeCtrl)
 
 setMemberCtrl (&$name, $value, $typeCtrl)
 
 addToMemberUnique (&$name, $value, $typeCtrl, $separator=" ")
 
 addToMemberCtrl (&$name, $value, $typeCtrl, $separator=" ")
 
 addToMember (&$name, $value, $separator=' ')
 
 removeOldValues (&$oldValue, $allValues)
 
 _getElementBy ($callback, $elements)
 
 setWrapBefore ($wrapBefore)
 
 setWrapAfter ($wrapAfter)
 
 compile_once (JsUtils $js=NULL, &$view=NULL)
 
- Protected Member Functions inherited from BaseWidget
 cleanIdentifier ($id)
 
- Protected Member Functions inherited from BaseHtmlEventsTrait
 _eventsOnCreate (JsUtils $js=NULL)
 
- Protected Member Functions inherited from BaseHtmlPropertiesTrait
 removePropertyValues ($name, $values)
 
 addToPropertyUnique ($name, $value, $typeCtrl)
 
 setPropertyCtrl ($name, $value, $typeCtrl)
 
 getElementByPropertyValue ($propertyName, $value, $elements)
 

Protected Attributes

 $_template
 
 $tagName
 
 $_wrapBefore = array()
 
 $_wrapAfter = array()
 
 $_bsComponent
 
 $_compiled = false
 
 $_runned = false
 
 $_postCompile
 
 $_preCompile
 
- Protected Attributes inherited from BaseWidget
 $identifier
 
 $_identifier
 
 $_libraryId
 
 $_self
 
- Protected Attributes inherited from BaseHtmlEventsTrait
 $_events =array ()
 
- Protected Attributes inherited from BaseHtmlPropertiesTrait
 $properties =array ()
 

Private Member Functions

 _callSetter ($setter, $key, $value, &$array)
 
 addCallback ($originalValue, $callback)
 
 callCallback ($callable)
 

Detailed Description

BaseHtml for HTML components.

Author
jc
Version
1.3.3

Definition at line 17 of file BaseHtml.php.

Member Function Documentation

◆ __toString()

__toString ( )

◆ _callSetter()

_callSetter (   $setter,
  $key,
  $value,
$array 
)
private

Definition at line 44 of file BaseHtml.php.

◆ _getElementBy()

_getElementBy (   $callback,
  $elements 
)
protected

Reimplemented from BaseHtmlPropertiesTrait.

Definition at line 108 of file BaseHtml.php.

◆ addCallback()

addCallback (   $originalValue,
  $callback 
)
private

Definition at line 325 of file BaseHtml.php.

◆ addToMember()

addToMember ( $name,
  $value,
  $separator = ' ' 
)
protected

Definition at line 98 of file BaseHtml.php.

◆ addToMemberCtrl()

addToMemberCtrl ( $name,
  $value,
  $typeCtrl,
  $separator = " " 
)
protected

Definition at line 89 of file BaseHtml.php.

◆ addToMemberUnique()

addToMemberUnique ( $name,
  $value,
  $typeCtrl,
  $separator = " " 
)
protected

Definition at line 81 of file BaseHtml.php.

◆ asDropZone()

asDropZone (   $jsCallback = "",
  $jqueryDone = "append",
  $parameters = [] 
)

Declares the element as a drop zone (HTML5 drag and drop)

Parameters
string$jsCallback
string$jqueryDone
array$parameters
Returns
\Ajax\common\html\BaseHtml

Definition at line 269 of file BaseHtml.php.

◆ asFileDropZone()

asFileDropZone (   $responseElement = null,
  $url = null,
  $progress = null,
  $jsCallback = "",
  $parameters = [] 
)

Declares the element as a drop zone for file uploading (HTML5 drag and drop)

Parameters
?string$responseElement
?string$url
?string$progress
string$jsCallback
array$parameters
Returns
\Ajax\common\html\BaseHtml

Definition at line 287 of file BaseHtml.php.

◆ callCallback()

callCallback (   $callable)
private

Definition at line 338 of file BaseHtml.php.

◆ compile()

◆ compile_once()

compile_once ( JsUtils  $js = NULL,
$view = NULL 
)
protected

Reimplemented in HtmlTable.

Definition at line 193 of file BaseHtml.php.

◆ ctrl()

ctrl (   $name,
  $value,
  $typeCtrl 
)
protected

Reimplemented from BaseHtmlPropertiesTrait.

Definition at line 62 of file BaseHtml.php.

◆ fromArray()

◆ fromDatabaseObject()

◆ fromDatabaseObjects()

fromDatabaseObjects (   $objects,
  $function 
)

Definition at line 159 of file BaseHtml.php.

◆ getBsComponent()

getBsComponent ( )

Definition at line 184 of file BaseHtml.php.

◆ getElementById()

getElementById (   $identifier,
  $elements 
)

Definition at line 178 of file BaseHtml.php.

◆ getTagName()

getTagName ( )

Definition at line 137 of file BaseHtml.php.

◆ getTemplate()

getTemplate ( JsUtils  $js = NULL,
  $view = null 
)
protected

Definition at line 58 of file BaseHtml.php.

◆ onPostCompile()

onPostCompile (   $callback)

Definition at line 317 of file BaseHtml.php.

◆ onPreCompile()

onPreCompile (   $callback)

Definition at line 321 of file BaseHtml.php.

◆ removeOldValues()

removeOldValues ( $oldValue,
  $allValues 
)
protected

Reimplemented from BaseHtmlPropertiesTrait.

Definition at line 103 of file BaseHtml.php.

◆ run()

◆ setBsComponent()

setBsComponent (   $bsComponent)

Definition at line 188 of file BaseHtml.php.

◆ setDraggable()

setDraggable (   $attr = "id",
  $dropZone = null,
  $parameters = [] 
)

Sets the element draggable, and eventualy defines the dropzone (HTML5 drag and drop)

Parameters
string$attrdefault: "id"
BaseHtml$dropZonethe dropzone element
array$parametersdefault: ["jsCallback"=>"","jqueryDone"=>"append"]
Returns
\Ajax\common\html\BaseHtml

Definition at line 249 of file BaseHtml.php.

◆ setMemberCtrl()

setMemberCtrl ( $name,
  $value,
  $typeCtrl 
)
protected

Definition at line 75 of file BaseHtml.php.

◆ setTagName()

setTagName (   $tagName)

Reimplemented in HtmlDropdown.

Definition at line 141 of file BaseHtml.php.

◆ setWrapAfter()

setWrapAfter (   $wrapAfter)
protected

Definition at line 132 of file BaseHtml.php.

◆ setWrapBefore()

setWrapBefore (   $wrapBefore)
protected

Definition at line 127 of file BaseHtml.php.

◆ wrap()

wrap (   $before,
  $after = "" 
)

Definition at line 170 of file BaseHtml.php.

Field Documentation

◆ $_bsComponent

$_bsComponent
protected

Definition at line 27 of file BaseHtml.php.

◆ $_compiled

$_compiled = false
protected

Definition at line 29 of file BaseHtml.php.

◆ $_postCompile

$_postCompile
protected

Definition at line 33 of file BaseHtml.php.

◆ $_preCompile

$_preCompile
protected

Definition at line 35 of file BaseHtml.php.

◆ $_runned

$_runned = false
protected

Definition at line 31 of file BaseHtml.php.

◆ $_template

$_template
protected

Definition at line 19 of file BaseHtml.php.

◆ $_wrapAfter

$_wrapAfter = array()
protected

Definition at line 25 of file BaseHtml.php.

◆ $_wrapBefore

$_wrapBefore = array()
protected

Definition at line 23 of file BaseHtml.php.

◆ $tagName

$tagName
protected

Definition at line 21 of file BaseHtml.php.


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