protected function getRecord()
    {
        $id = (int) $this->request->param('ID');
        if (!$id) {
            $id = (int) $this->request->requestVar('ID');
        }
        if ($id) {
            $type = $this->stat('model_class');
            $action = $this->request->param('Action');
            if ($action == 'dashlet' || $action == 'widget') {
                $type = 'Dashlet';
            }
            $item = $this->dataService->byId($type, $id);
            if ($item instanceof DashboardPage) {
                $item->setController($this);
            }

            return $item;
        }
    }