Code Duplication    Length = 6-7 lines in 3 locations

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

@@ 22-27 (lines=6) @@
19
class DataForm extends Widget {
20
	use FormFieldAsTrait,FormTrait;
21
22
	public function __construct($identifier, $modelInstance=NULL) {
23
		parent::__construct($identifier, null,$modelInstance);
24
		$this->_instanceViewer=new FormInstanceViewer($identifier);
25
		$this->content=["form"=>new HtmlForm($identifier)];
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

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

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($identifier);
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);