/** * Gets the raw post if allowed * * @param int $id */ public function rawPost($id) { $item = $this->dataService->byId('MicroPost', $id); if ($item->checkPerm('Write')) { return $item; } }
/** * Overridden to make sure the dashboard page is attached to the correct controller * @return type */ 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; } }