Added 'user_id' (created by) and 'create_date' columns to 'project' table.
This commit is contained in:
parent
7382df7f6d
commit
dd4f3bfbad
7 changed files with 155 additions and 28 deletions
|
|
@ -25,16 +25,22 @@ class ProjectService
|
|||
|
||||
/**
|
||||
* Create a new project model and use the project store to save it.
|
||||
* @param string $title
|
||||
* @param string $type
|
||||
* @param string $reference
|
||||
* @param array $options
|
||||
*
|
||||
* @param string $title
|
||||
* @param string $type
|
||||
* @param string $reference
|
||||
* @param integer $userId
|
||||
* @param array $options
|
||||
*
|
||||
* @return \PHPCensor\Model\Project
|
||||
*/
|
||||
public function createProject($title, $type, $reference, $options = [])
|
||||
public function createProject($title, $type, $reference, $userId, $options = [])
|
||||
{
|
||||
// Create base project and use updateProject() to set its properties:
|
||||
$project = new Project();
|
||||
$project->setCreateDate(new \DateTime());
|
||||
$project->setUserId((integer)$userId);
|
||||
|
||||
return $this->updateProject($project, $title, $type, $reference, $options);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue