Code Duplication    Length = 12-13 lines in 2 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

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