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;
        }
    }
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;
        }
    }
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 ; } }
Overridden to make sure the dashboard page is attached to the correct controller
@return type
Overridden to make sure the dashboard page is attached to the correct controller