phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlSingleElement.php
Go to the documentation of this file.
1<?php
2
3namespace Ajax\common\html;
4
6
8
9 public function __construct($identifier, $tagName="br") {
10 parent::__construct($identifier);
11 $this->tagName=$tagName;
12 $this->_template='<%tagName% id="%identifier%" %properties%/>';
13 }
14
15 public function setClass($classNames) {
16 if(\is_array($classNames)){
17 $classNames=implode(" ", $classNames);
18 }
19 $this->setProperty("class", $classNames);
20 return $this;
21 }
22
23 public function addClass($classNames) {
24 if(\is_array($classNames)){
25 $classNames=implode(" ", $classNames);
26 }
27 $this->addToProperty("class", $classNames);
28 return $this;
29 }
30
31 public function setRole($value) {
32 $this->setProperty("role", $value);
33 return $this;
34 }
35
36 public function setTitle($value) {
37 $this->setProperty("title", $value);
38 return $this;
39 }
40
41 public function setStyle($value){
42 $this->setProperty("style", $value);
43 return $this;
44 }
45
50 public function run(JsUtils $js) {
51
52 }
53
54 /*
55 * (non-PHPdoc)
56 * @see \Ajax\bootstrap\html\BaseHtml::fromArray()
57 */
58 public function fromArray($array) {
59 $array=parent::fromArray($array);
60 foreach ( $array as $key => $value ) {
61 $this->setProperty($key, $value);
62 }
63 return $array;
64 }
65
66 public function setSize($size) {
67 }
68}
JQuery PHP library.
Definition JsUtils.php:23
BaseHtml for HTML components.
Definition BaseHtml.php:17
run(JsUtils $js)
SimpleExtComponent
__construct($identifier, $tagName="br")