Code Duplication    Length = 11-13 lines in 3 locations

Ajax/bootstrap/html/HtmlButton.php 1 location

@@ 24-35 (lines=12) @@
21
	 * @param string $cssStyle btn-default, btn-primary...
22
	 * @param string $onClick JS Code for click event
23
	 */
24
	public function __construct($identifier, $value="", $cssStyle=null, $onClick=null) {
25
		parent::__construct($identifier, "button");
26
		$this->setProperty("class", "btn btn-default");
27
		$this->setProperty("role", "button");
28
		$this->content=$value;
29
		if (isset($cssStyle)) {
30
			$this->setStyle($cssStyle);
31
		}
32
		if (isset($onClick)) {
33
			$this->onClick($onClick);
34
		}
35
	}
36
37
	/**
38
	 * Set the button value

Ajax/bootstrap/html/HtmlButtongroups.php 1 location

@@ 17-29 (lines=13) @@
14
class HtmlButtongroups extends HtmlBsDoubleElement {
15
	protected $elements;
16
17
	public function __construct($identifier, $elements=array(), $cssStyle=NULL, $size=NULL, $tagName="div") {
18
		parent::__construct($identifier, $tagName);
19
		$this->_template="<%tagName% id='%identifier%' %properties%>%elements%</%tagName%>";
20
		$this->setProperty("class", "btn-group");
21
		$this->setRole("group");
22
		$this->addElements($elements);
23
		if (isset($cssStyle)) {
24
			$this->setStyle($cssStyle);
25
		}
26
		if (isset($size)) {
27
			$this->setSize($size);
28
		}
29
	}
30
31
	/**
32
	 * define the buttons size

Ajax/semantic/html/elements/HtmlButton.php 1 location

@@ 22-32 (lines=11) @@
19
	 * @param string $cssStyle btn-default, btn-primary...
20
	 * @param string $onClick JS Code for click event
21
	 */
22
	public function __construct($identifier, $value="", $cssStyle=null, $onClick=null) {
23
		parent::__construct($identifier, "button");
24
		$this->setProperty("class", "ui button");
25
		$this->content=$value;
26
		if (isset($cssStyle)) {
27
			$this->setStyle($cssStyle);
28
		}
29
		if (isset($onClick)) {
30
			$this->onClick($onClick);
31
		}
32
	}
33
34
	/**
35
	 * Set the button value