public function delete(PropelPDO $con = null) { $logEntry = new Log(); $logEntry->setWhen(time()); $logEntry->setPropelClass("Project"); $logEntry->setSfGuardUserProfileId(sfContext::getInstance()->getUser()->getUserId()); $logEntry->setMessage("Project deleted."); $logEntry->setLogMessageTypeId(sfConfig::get("app_log_type_delete")); $logEntry->setPropelId($this->getId()); $logEntry->save(); parent::delete($con); }
/** * Delete project * * @param void * @return boolean */ function delete() { $this->clearMessages(); $this->clearTaskLists(); $this->clearMilestones(); $this->clearFiles(); $this->clearFolders(); $this->clearForms(); $this->clearPermissions(); $this->clearLogs(); return parent::delete(); }
public function getYear($format = '') { return date('Y', strtotime(parent::getYear())); }
public function getPeer() { if (self::$peer === null) { self::$peer = new ProjectPeer(); } return self::$peer; }
/** * Delete project * * @param void * @return boolean */ protected function deleteSingle() { @set_time_limit(0); $this->clearMessages(); $this->clearTasks(); $this->clearMilestones(); $this->clearFiles(); $this->clearForms(); $this->clearPermissions(); $this->clearLogs(); $this->clearRoles(); $this->clearMails(); $this->clearWebpages(); $this->clearEvents(); $this->clearCompanies(); $this->clearTimeslots(); return parent::delete(); }
/** * Delete project and all realted data * * @param void * @return null */ function delete() { db_begin_work(); $delete = parent::delete(); if ($delete && !is_error($delete)) { ProjectObjects::deleteByProject($this); ProjectUsers::deleteByProject($this); PinnedProjects::deleteByProject($this); search_index_remove($this->getId(), 'Project'); clean_project_permissions_cache($this); event_trigger('on_project_deleted', array($this)); db_commit(); } else { db_rollback(); } // if return $delete; }