phpMv  -UI toolkit 2.2.5
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
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) More...
 
 asDropZone ($jsCallback="", $jqueryDone="append", $parameters=[])
 Declares the element as a drop zone (HTML5 drag and drop) More...
 
 __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. More...
 
 getOnClick ($url, $responseElement="", $parameters=array())
 Performs a get to $url on the click event on $element and display it in $responseElement. More...
 
 postOn ($event, $url, $params="{}", $responseElement="", $parameters=array())
 Performs a post to $url on the event $event on $element and display it in $responseElement. More...
 
 postOnClick ($url, $params="{}", $responseElement="", $parameters=array())
 Performs a post to $url on the click event on $element and display it in $responseElement. More...
 
 postFormOn ($event, $url, $form, $responseElement="", $parameters=array())
 Performs a post form with ajax. More...
 
 postFormOnClick ($url, $form, $responseElement="", $parameters=array())
 Performs a post form with ajax on click. More...
 
 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
 ctrl ($name, $value, $typeCtrl)
 
 removeOldValues (&$oldValue, $allValues)
 
 _getElementBy ($callback, $elements)
 
 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

Definition at line 17 of file BaseHtml.php.

Member Function Documentation

◆ __toString()

__toString ( )

Definition at line 269 of file BaseHtml.php.

◆ _callSetter()

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

Definition at line 35 of file BaseHtml.php.

◆ _getElementBy()

_getElementBy (   $callback,
  $elements 
)
protected

Definition at line 105 of file BaseHtml.php.

◆ addCallback()

addCallback (   $originalValue,
  $callback 
)
private

Definition at line 281 of file BaseHtml.php.

◆ addToMember()

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

Definition at line 93 of file BaseHtml.php.

◆ addToMemberCtrl()

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

Definition at line 84 of file BaseHtml.php.

◆ addToMemberUnique()

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

Definition at line 74 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

Definition at line 261 of file BaseHtml.php.

◆ callCallback()

callCallback (   $callable)
private

Definition at line 292 of file BaseHtml.php.

◆ compile()

compile ( JsUtils  $js = NULL,
$view = NULL 
)

Definition at line 205 of file BaseHtml.php.

◆ compile_once()

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

Definition at line 191 of file BaseHtml.php.

◆ ctrl()

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

Definition at line 53 of file BaseHtml.php.

◆ fromArray()

fromArray (   $array)

Definition at line 143 of file BaseHtml.php.

◆ fromDatabaseObject()

fromDatabaseObject (   $object,
  $function 
)

Definition at line 165 of file BaseHtml.php.

◆ fromDatabaseObjects()

fromDatabaseObjects (   $objects,
  $function 
)

Definition at line 156 of file BaseHtml.php.

◆ getBsComponent()

getBsComponent ( )

Definition at line 182 of file BaseHtml.php.

◆ getElementById()

getElementById (   $identifier,
  $elements 
)

Definition at line 178 of file BaseHtml.php.

◆ getTagName()

getTagName ( )

Definition at line 134 of file BaseHtml.php.

◆ getTemplate()

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

Definition at line 49 of file BaseHtml.php.

◆ onPostCompile()

onPostCompile (   $callback)

Definition at line 273 of file BaseHtml.php.

◆ onPreCompile()

onPreCompile (   $callback)

Definition at line 277 of file BaseHtml.php.

◆ removeOldValues()

removeOldValues ( $oldValue,
  $allValues 
)
protected

Definition at line 100 of file BaseHtml.php.

◆ run()

run ( JsUtils  $js)
abstract
Parameters
JsUtils$js
Returns
SimpleExtComponent

◆ setBsComponent()

setBsComponent (   $bsComponent)

Definition at line 186 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

Definition at line 243 of file BaseHtml.php.

◆ setMemberCtrl()

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

Definition at line 68 of file BaseHtml.php.

◆ setTagName()

setTagName (   $tagName)

Definition at line 138 of file BaseHtml.php.

◆ setWrapAfter()

setWrapAfter (   $wrapAfter)
protected

Definition at line 129 of file BaseHtml.php.

◆ setWrapBefore()

setWrapBefore (   $wrapBefore)
protected

Definition at line 124 of file BaseHtml.php.

◆ wrap()

wrap (   $before,
  $after = "" 
)

Definition at line 168 of file BaseHtml.php.

Field Documentation

◆ $_bsComponent

$_bsComponent
protected

Definition at line 22 of file BaseHtml.php.

◆ $_compiled

$_compiled =false
protected

Definition at line 23 of file BaseHtml.php.

◆ $_postCompile

$_postCompile
protected

Definition at line 25 of file BaseHtml.php.

◆ $_preCompile

$_preCompile
protected

Definition at line 26 of file BaseHtml.php.

◆ $_runned

$_runned =false
protected

Definition at line 24 of file BaseHtml.php.

◆ $_template

$_template
protected

Definition at line 18 of file BaseHtml.php.

◆ $_wrapAfter

$_wrapAfter =array ()
protected

Definition at line 21 of file BaseHtml.php.

◆ $_wrapBefore

$_wrapBefore =array ()
protected

Definition at line 20 of file BaseHtml.php.

◆ $tagName

$tagName
protected

Definition at line 19 of file BaseHtml.php.


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