Code Duplication    Length = 5-5 lines in 2 locations

Ajax/common/html/HtmlCollection.php 1 location

@@ 53-57 (lines=5) @@
50
	}
51
52
	protected function setItemIdentifier($item,$classname,$index){
53
		if($item instanceof BaseWidget){
54
			if($item->getIdentifier()===""){
55
				$item->setIdentifier($classname."-".$this->identifier."-".$index);
56
			}
57
		}
58
	}
59
60
	/**

Ajax/common/Widget.php 1 location

@@ 226-230 (lines=5) @@
223
	 */
224
	public function addInToolbar($element,$callback=NULL){
225
		$tb=$this->getToolbar();
226
		if($element instanceof BaseWidget){
227
			if($element->getIdentifier()===""){
228
				$element->setIdentifier("tb-item-".$this->identifier."-".$tb->count());
229
			}
230
		}
231
		if(isset($callback)){
232
			if(\is_callable($callback)){
233
				$callback($element);