Code Duplication    Length = 6-7 lines in 2 locations

Ajax/semantic/widgets/dataelement/DataElement.php 1 location

@@ 21-27 (lines=7) @@
18
 */
19
class DataElement extends Widget {
20
21
	public function __construct($identifier, $modelInstance=NULL) {
22
		parent::__construct($identifier, null,$modelInstance);
23
		$this->_instanceViewer=new InstanceViewer();
24
		$this->content=["table"=>new HtmlTable($identifier, 0,2)];
25
		$this->content["table"]->setDefinition();
26
		$this->_toolbarPosition=PositionInTable::BEFORETABLE;
27
	}
28
29
	public function compile(JsUtils $js=NULL,&$view=NULL){
30
		$this->_instanceViewer->setInstance($this->_modelInstance);

Ajax/semantic/widgets/datatable/DataTable.php 1 location

@@ 45-50 (lines=6) @@
42
		parent::run($js);
43
	}
44
45
	public function __construct($identifier,$model,$modelInstance=NULL) {
46
		parent::__construct($identifier, $model,$modelInstance);
47
		$this->_instanceViewer=new InstanceViewer();
48
		$this->content=["table"=>new HtmlTable($identifier, 0,0)];
49
		$this->_toolbarPosition=PositionInTable::BEFORETABLE;
50
	}
51
52
	public function compile(JsUtils $js=NULL,&$view=NULL){
53
		$this->_instanceViewer->setInstance($this->_model);