Lines Matching refs:this

2 /** @var action_plugin_bez $this */
6 if ($this->model->get_level() < BEZ_AUTH_USER) {
10 if ($this->get_param('tid') == '') {
11 header('Location: ' . $this->url('tasks'));
15 $task = $this->model->taskFactory->get_one($this->get_param('tid'));
16 $this->tpl->set('task', $task);
17 $this->tpl->set('task_comments', $this->model->task_commentFactory->get_from_task($task));
18 $this->tpl->set('task_programs', $this->model->task_programFactory->get_all([], 'name'));
20 if ($this->get_param('action') == 'comment_add') {
23 $task_comment = $this->model->task_commentFactory->create_object(array('task' => $task));
24 $this->model->task_commentFactory->initial_save($task_comment, $_POST);
29 } elseif ($this->get_param('action') == 'subscribe') {
31 $task->set_participant_flags($this->model->user_nick, array('subscribent'));
34 } elseif ($this->get_param('action') == 'unsubscribe') {
36 $task->remove_participant_flags($this->model->user_nick, array('subscribent'));
38 $this->add_notification($this->getLang('task_unsubscribed_com'));
41 } elseif ($this->get_param('action') == 'invite') {
45 $this->add_notification($this->model->userFactory->get_user_email($client), $this->getLang('invitation_has_been_send'));
48 } elseif ($this->get_param('action') == 'participant_remove') {
49 $user_id = $this->get_param('user_id');
52 $name = $this->model->userFactory->get_user_full_name($user_id);
53 $notif = sprintf($this->getLang('participant_removed'), $name);
54 $this->add_notification($notif);
57 } elseif ($this->get_param('action') == 'comment_delete') {
59 $task_comment = $this->model->task_commentFactory->get_one($this->get_param('zkid'), array('task' => $task));
60 $this->model->task_commentFactory->delete($task_comment);
63 } elseif ($this->get_param('action') == 'comment_edit') {
65 $task_comment = $this->model->task_commentFactory->get_one($this->get_param('zkid'), array('thread' => $thread));
68 $this->tpl->set_values($task_comment->get_assoc());
70 $this->model->task_commentFactory->update_save($task_comment, $_POST);
75 } elseif ($this->get_param('action') == 'task_edit') {
78 $this->tpl->set_values($task->get_assoc());
80 $this->model->taskFactory->update_save($task, $_POST);
83 } elseif ($this->get_param('action') == 'task_delete') {
84 $this->model->taskFactory->delete($task);
86 header('Location: ' . $this->url('thread', 'id', $task->thread_id));
88 header("Location: " . $this->url('tasks'));
90 } elseif ($this->get_param('action') == 'pin') {
94 } elseif ($this->get_param('action') == 'unpin') {
106 header("Location: " . $this->url('task', 'tid', $task->id) . $anchor);