public function onDelete() { $prm = new Permission(); $prm->setGroup($this->getGroup()); $prm->setAction($this->getAction()); $oPrm = $prm->read(); if ($oPrm === null) { throw new GraphException('Permission ' . $this->getAction() . ' not found for ' . $this->getGroup(), 400); } else { $this->content['id'] = $oPrm->getId(); $this->content['version'] = $oPrm->getVersion(); } }