Skip to content

Commit 80f9660

Browse files
committed
BaseEvents doc
1 parent 299fb12 commit 80f9660

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Ajax/common/html/traits/BaseHtmlEventsTrait.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ trait BaseHtmlEventsTrait{
1515

1616
protected $_events=array ();
1717

18+
/**
19+
* @param string $event
20+
* @param string|AjaxCall $jsCode
21+
* @param boolean $stopPropagation
22+
* @param boolean $preventDefault
23+
* @return \Ajax\common\html\BaseHtml
24+
*/
1825
public function addEvent($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
1926
if ($stopPropagation === true) {
2027
$jsCode="event.stopPropagation();" . $jsCode;
@@ -43,6 +50,13 @@ public function _addEvent($event, $jsCode) {
4350
return $this;
4451
}
4552

53+
/**
54+
* @param string $event
55+
* @param string $jsCode
56+
* @param boolean $stopPropagation
57+
* @param boolean $preventDefault
58+
* @return \Ajax\common\html\BaseHtml
59+
*/
4660
public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
4761
return $this->addEvent($event, $jsCode, $stopPropagation, $preventDefault);
4862
}

0 commit comments

Comments
 (0)