public function doUnpublish() { if (!parent::doUnpublish()) { return false; } $filepath = $this->owner->getPdfFilename(); if (file_exists($filepath)) { unlink($filepath); } return true; }