1 | <?php |
||
20 | class Updater extends RepositoryUpdater |
||
21 | { |
||
22 | /** |
||
23 | * @var Project |
||
24 | */ |
||
25 | protected $model; |
||
26 | |||
27 | public function __construct(Project $model) |
||
31 | |||
32 | /** |
||
33 | * removes a user from a project. |
||
34 | * |
||
35 | * @param int $userId |
||
36 | * |
||
37 | * @return mixed |
||
38 | */ |
||
39 | public function unassignUser($userId) |
||
43 | |||
44 | /** |
||
45 | * Assign a user to a project. |
||
46 | * |
||
47 | * @param int $userId |
||
48 | * @param int $roleId |
||
49 | * |
||
50 | * @return Project\User |
||
51 | */ |
||
52 | public function assignUser($userId, $roleId = 0) |
||
63 | |||
64 | /** |
||
65 | * Assign list of user ids to the project. |
||
66 | * |
||
67 | * @param array $userIds |
||
68 | * |
||
69 | * @return void |
||
70 | */ |
||
71 | public function assignUsers(array $userIds) |
||
77 | |||
78 | /** |
||
79 | * Create a new project. |
||
80 | * |
||
81 | * @param array $input |
||
82 | * |
||
83 | * @return $this |
||
84 | */ |
||
85 | public function create(array $input = []) |
||
94 | |||
95 | /** |
||
96 | * Update project details. |
||
97 | * |
||
98 | * @param array $attributes |
||
99 | * |
||
100 | * @return bool |
||
101 | */ |
||
102 | public function update(array $attributes = []) |
||
108 | |||
109 | /** |
||
110 | * Delete a project. |
||
111 | * |
||
112 | * @return void |
||
113 | * |
||
114 | * @throws \Exception |
||
115 | */ |
||
116 | public function delete() |
||
120 | |||
121 | protected function deleteProject() |
||
149 | |||
150 | /** |
||
151 | * Save the project tags. |
||
152 | * |
||
153 | * @param array $tagIds |
||
154 | * |
||
155 | * @return bool |
||
156 | */ |
||
157 | protected function saveKanbanTags(array $tagIds) |
||
183 | } |
||
184 |