Code Duplication    Length = 6-7 lines in 3 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

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

Ajax/semantic/widgets/dataform/DataForm.php 1 location

@@ 20-25 (lines=6) @@
17
class DataForm extends Widget {
18
	use FormFieldAsTrait;
19
20
	public function __construct($identifier, $modelInstance=NULL) {
21
		parent::__construct($identifier, null,$modelInstance);
22
		$this->_instanceViewer=new FormInstanceViewer();
23
		$this->content=["form"=>new HtmlForm($identifier)];
24
		$this->_toolbarPosition=PositionInTable::BEFORETABLE;
25
	}
26
27
	public function compile(JsUtils $js=NULL,&$view=NULL){
28
		$this->_instanceViewer->setInstance($this->_modelInstance);