_doc->setHeader('Edit ' . $this->getConfig('itemName')); return parent::_doEdit(); } protected function _doUpdate() { $this->_doc->setHeader('Edit ' . $this->getConfig('itemName')); return parent::_doUpdate(); } protected function _doNew() { $this->_doc->setHeader('Add New ' . $this->getConfig('itemName')); return parent::_doNew(); } protected function _doInsert() { $this->_doc->setHeader('Add New ' . $this->getConfig('itemName')); return parent::_doInsert(); } protected function _postInsert() { $this->_sendAdminNotification(self::SETTINGS_MAIL_PREFIX, 'DocumentAdded', $this->_getNotificationData()); return parent::_postInsert(); } protected function _postDelete() { $this->_sendAdminNotification(self::SETTINGS_MAIL_PREFIX, 'DocumentDeleted', $this->_getNotificationData()); return parent::_postDelete(); } protected function _getNotificationData() { $data = $this->_getDataObj()->getData(); $committeeData = $this->_getDataObj()->getCommitteeData($data['committeeId']); $documentLink = AdminView::getPage('url') . '/' . $data['committeeId']; $userData = \App_User_Auth::getInstance()->getData(); return array( 'documentName' => htmlspecialchars($data['title']), 'documentLink' => $documentLink . '?action=edit&id=' . $this->_getDataObj()->getPrimaryKey(), 'linkToCommitteeDocuments' => $documentLink, 'committeeName' => htmlspecialchars($committeeData['title']), 'memberLink' => \App_User_Admin_View::getEditUrl($userData['id']), 'memberFirstName' => htmlspecialchars($userData['firstName']), 'memberLastName' => htmlspecialchars($userData['lastName']), ); } }