コード例 #1
0
ファイル: ProjectModel.php プロジェクト: dextercowley/jissues
 /**
  * Delete a project.
  *
  * @param   string  $alias  The project alias.
  *
  * @return  $this  Method allows chaining
  *
  * @since   1.0
  */
 public function delete($alias)
 {
     $project = $this->getByAlias($alias);
     // Delete access groups associated with the project
     $this->db->setQuery($this->db->getQuery(true)->delete($this->db->quoteName('#__accessgroups'))->where($this->db->quoteName('project_id') . '=' . (int) $project->project_id))->execute();
     // @todo: cleanup more.
     // Delete the project
     $table = new ProjectsTable($this->db);
     $table->delete($project->project_id);
     return $this;
 }