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

Public Member Functions

 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 ()
 

Protected Member Functions

 _eventsOnCreate (JsUtils $js=NULL)
 

Protected Attributes

 $_events =array ()
 

Detailed Description

Definition at line 14 of file BaseHtmlEventsTrait.php.

Member Function Documentation

◆ _addEvent()

_addEvent (   $event,
  $jsCode 
)
Parameters
string$event
string | AjaxCall$jsCode
Returns
BaseHtml

Reimplemented in HtmlPagination.

Definition at line 48 of file BaseHtmlEventsTrait.php.

◆ _ajaxOn()

_ajaxOn (   $operation,
  $event,
  $url,
  $responseElement = "",
  $parameters = array() 
)
Parameters
string$operationhttp method get, post, postForm or json
string$eventthe event that triggers the request
string$urlThe url of the request
string$responseElementThe selector of the HTML element displaying the answer
array$parametersdefault : array("preventDefault"=>true,"stopPropagation"=>true,"params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"ajaxLoader"=>null,"immediatly"=>true,"jqueryDone"=>"html","ajaxTransition"=>null,"jsCondition"=>null,"headers"=>null,"historize"=>false)
Returns
$this

Reimplemented in HtmlBreadcrumbs, and HtmlBreadcrumb.

Definition at line 136 of file BaseHtmlEventsTrait.php.

◆ _eventsOnCreate()

_eventsOnCreate ( JsUtils  $js = NULL)
protected

Definition at line 116 of file BaseHtmlEventsTrait.php.

◆ addEvent()

addEvent (   $event,
  $jsCode,
  $stopPropagation = false,
  $preventDefault = false 
)
Parameters
string$event
string | AjaxCall$jsCode
boolean$stopPropagation
boolean$preventDefault
Returns
BaseHtml

Definition at line 25 of file BaseHtmlEventsTrait.php.

◆ addEventsOnRun()

addEventsOnRun ( JsUtils  $js = NULL)

Definition at line 91 of file BaseHtmlEventsTrait.php.

◆ executeOnRun()

executeOnRun (   $jsCode)

Definition at line 233 of file BaseHtmlEventsTrait.php.

◆ getEvents()

getEvents ( )
Returns
array

Definition at line 255 of file BaseHtmlEventsTrait.php.

◆ getOn()

getOn (   $event,
  $url,
  $responseElement = "",
  $parameters = array() 
)

Performs a get to $url on the event $event on $element and display it in $responseElement.

Parameters
string$eventthe event that triggers the get request
string$urlThe url of the request
string$responseElementThe selector of the HTML element displaying the answer
array$parametersdefault : array("preventDefault"=>true,"stopPropagation"=>true,"params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"ajaxLoader"=>null,"immediatly"=>true,"jqueryDone"=>"html","ajaxTransition"=>null,"jsCondition"=>null,"headers"=>null,"historize"=>false)
Returns
$this

Definition at line 152 of file BaseHtmlEventsTrait.php.

◆ getOnClick()

getOnClick (   $url,
  $responseElement = "",
  $parameters = array() 
)

Performs a get to $url on the click event on $element and display it in $responseElement.

Parameters
string$urlThe url of the request
string$responseElementThe selector of the HTML element displaying the answer
array$parametersdefault : array("preventDefault"=>true,"stopPropagation"=>true,"params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"ajaxLoader"=>null,"immediatly"=>true,"jqueryDone"=>"html","ajaxTransition"=>null,"jsCondition"=>null,"headers"=>null,"historize"=>false)
Returns
$this

Definition at line 164 of file BaseHtmlEventsTrait.php.

◆ jsDoJquery()

jsDoJquery (   $jqueryCall,
  $param = "" 
)

Definition at line 229 of file BaseHtmlEventsTrait.php.

◆ jsHide()

jsHide ( )

Reimplemented in HtmlModal, and HtmlModal.

Definition at line 245 of file BaseHtmlEventsTrait.php.

◆ jsHtml()

jsHtml (   $content = "")

Definition at line 237 of file BaseHtmlEventsTrait.php.

◆ jsShow()

jsShow ( )

Reimplemented in HtmlModal, and HtmlDimmer.

Definition at line 241 of file BaseHtmlEventsTrait.php.

◆ jsToggle()

jsToggle (   $value)

Definition at line 249 of file BaseHtmlEventsTrait.php.

◆ jsTrigger()

jsTrigger (   $event,
  $params = "[this]" 
)

Definition at line 39 of file BaseHtmlEventsTrait.php.

◆ on()

on (   $event,
  $jsCode,
  $stopPropagation = false,
  $preventDefault = false 
)
Parameters
string$event
string$jsCode
boolean$stopPropagation
boolean$preventDefault
Returns
BaseHtml

Reimplemented in HtmlBreadcrumbs, HtmlButtongroups, HtmlDropdown, HtmlTabs, HtmlBreadcrumb, and HtmlButtonGroups.

Definition at line 70 of file BaseHtmlEventsTrait.php.

◆ onClick()

onClick (   $jsCode,
  $stopPropagation = false,
  $preventDefault = true 
)

Definition at line 74 of file BaseHtmlEventsTrait.php.

◆ onCreate()

onCreate (   $jsCode)

Definition at line 82 of file BaseHtmlEventsTrait.php.

◆ postFormOn()

postFormOn (   $event,
  $url,
  $form,
  $responseElement = "",
  $parameters = array() 
)

Performs a post form with ajax.

Parameters
string$eventthe event that triggers the post request
string$urlThe url of the request
string$formThe form HTML id
string$responseElementselector of the HTML element displaying the answer
array$parametersdefault : array("params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"ajaxLoader"=>null,"jqueryDone"=>"html","ajaxTransition"=>null,"jsCondition"=>NULL,"headers"=>null,"historize"=>false)
Returns
$this

Definition at line 212 of file BaseHtmlEventsTrait.php.

◆ postFormOnClick()

postFormOnClick (   $url,
  $form,
  $responseElement = "",
  $parameters = array() 
)

Performs a post form with ajax on click.

Parameters
string$urlThe url of the request
string$formThe form HTML id
string$responseElementselector of the HTML element displaying the answer
array$parametersdefault : array("params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"ajaxLoader"=>null,"jqueryDone"=>"html","ajaxTransition"=>null,"jsCondition"=>NULL,"headers"=>null,"historize"=>false)
Returns
$this

Definition at line 225 of file BaseHtmlEventsTrait.php.

◆ postOn()

postOn (   $event,
  $url,
  $params = "{}",
  $responseElement = "",
  $parameters = array() 
)

Performs a post to $url on the event $event on $element and display it in $responseElement.

Parameters
string$eventthe event that triggers the post request
string$urlThe url of the request
string$paramsthe request parameters in JSON format
string$responseElementThe selector of the HTML element displaying the answer
array$parametersdefault : array("preventDefault"=>true,"stopPropagation"=>true,"params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"ajaxLoader"=>null,"immediatly"=>true,"jqueryDone"=>"html","ajaxTransition"=>null,"jsCondition"=>null,"headers"=>null,"historize"=>false)
Returns
$this

Definition at line 178 of file BaseHtmlEventsTrait.php.

◆ postOnClick()

postOnClick (   $url,
  $params = "{}",
  $responseElement = "",
  $parameters = array() 
)

Performs a post to $url on the click event on $element and display it in $responseElement.

Parameters
string$urlThe url of the request
string$paramsthe request parameters in JSON format
string$responseElementThe selector of the HTML element displaying the answer
array$parametersdefault : array("preventDefault"=>true,"stopPropagation"=>true,"params"=>"{}","jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"ajaxLoader"=>null,"immediatly"=>true,"jqueryDone"=>"html","ajaxTransition"=>null,"jsCondition"=>null,"headers"=>null,"historize"=>false)
Returns
$this

Definition at line 199 of file BaseHtmlEventsTrait.php.

◆ setClick()

setClick (   $jsCode)

Definition at line 78 of file BaseHtmlEventsTrait.php.

◆ trigger()

trigger (   $event,
  $params = "[]" 
)

Reimplemented in DataTable.

Definition at line 35 of file BaseHtmlEventsTrait.php.

Field Documentation

◆ $_events

$_events =array ()
protected

Definition at line 16 of file BaseHtmlEventsTrait.php.


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