code/Dashboard.php
public function handlePanel(SS_HTTPRequest $r) {
		if($r->param('ID') == "new") {
			$class = $r->getVar('type');
			if($class && class_exists($class) && is_subclass_of($class, "DashboardPanel")) {
				$panel = new $class();
				if($panel->canCreate()) {
					$panel->MemberID = Member::currentUserID();
					$panel->Title = $panel->getLabel();
					$panel->write();
				}
				else {
					$panel = null;
				}
			}
		}
		else {
			$panel = DashboardPanel::get()->byID((int) $r->param('ID'));
		}
		if($panel && ($panel->canEdit() || $panel->canView())) {
			$requestClass = $panel->getRequestHandlerClass();
			$handler = Object::create($requestClass, $this, $panel);				
			return $handler->handleRequest($r, DataModel::inst());

		}
		return $this->httpError(404);
	}
public function handlePanel(SS_HTTPRequest $r) {
		if($r->param('ID') == "new") {
			$class = $r->getVar('type');
			if($class && class_exists($class) && is_subclass_of($class, "DashboardPanel")) {
				$panel = new $class();
				if($panel->canCreate()) {
					$panel->MemberID = Member::currentUserID();
					$panel->Title = $panel->getLabel();
					$panel->write();
				}
				else {
					$panel = null;
				}
			}
		}
		else {
			$panel = DashboardPanel::get()->byID((int) $r->param('ID'));
		}
		if($panel && ($panel->canEdit() || $panel->canView())) {
			$requestClass = $panel->getRequestHandlerClass();
			$handler = Object::create($requestClass, $this, $panel);				
			return $handler->handleRequest($r, DataModel::inst());

		}
		return $this->httpError(404);
	}
Handles a request for a {@link DashboardPanel} object. Can be a new record or existing

@param SS_HTTPRequest The current request
@return SS_HTTPResponse