public function duplicate($dowrite = true) {
		$clone = parent::duplicate(true);
		foreach($this->has_many() as $relationName => $relationClass) {
			foreach($this->$relationName() as $relObject) {
				$relClone = $relObject->duplicate(false);
				$relClone->DashboardPanelID = $clone->ID;
				$relClone->write();
			}
		}
		return $clone;
	}
public function duplicate($dowrite = true) {
		$clone = parent::duplicate(true);
		foreach($this->has_many() as $relationName => $relationClass) {
			foreach($this->$relationName() as $relObject) {
				$relClone = $relObject->duplicate(false);
				$relClone->DashboardPanelID = $clone->ID;
				$relClone->write();
			}
		}
		return $clone;
	}
public function duplicate ( $ dowrite = true ) { $ clone = parent :: duplicate ( true ) ; foreach ( $ this -> has_many ( ) as $ relationName => $ relationClass ) { foreach ( $ this -> $ relationName ( ) as $ relObject ) { $ relClone = $ relObject -> duplicate ( false ) ; $ relClone -> DashboardPanelID = $ clone -> ID ; $ relClone -> write ( ) ; } } return $ clone ; }
Duplicates this panel. Drills down into the has_many relations

@return DashboardPanel
Duplicates this panel . Drills down into the has_many relations