public function delete()
{
$this->events()->trigger(__CLASS__, 'before.delete', $this);
if (!empty($this->data['document_type_id'])) {
$table = new TableGateway('document_type_view', $this->getAdapter());
$table->delete(array('document_type_id' => $this->getDocumentTypeId()));
$this->events()->trigger(__CLASS__, 'after.delete', $this);
return true;
}
$this->events()->trigger(__CLASS__, 'after.delete.failed', $this);
return false;
}