19 declare(strict_types=1);
46 $this->
lng->loadLanguageModule(
'forum');
54 foreach ($drafts as $draft) {
63 $this->
lng->txt(
'frm_task_publishing_draft_title'),
64 $draft->getPostSubject()
67 $task = $this->taskService->derived()->factory()->task(
75 if (0 === $draft->getThreadId()) {
82 $params[
'draft_id'] = $draft->getDraftId();
83 $cmd =
'editThreadDraft';
85 $params[
'thr_pk'] = $draft->getThreadId();
86 $params[
'pos_pk'] = $draft->getPostId();
88 $anchor =
'draft_' . $draft->getDraftId();
92 $this->
ctrl->setParameterByClass(ilObjForumGUI::class,
$name, $value);
94 $url = $this->
ctrl->getLinkTargetByClass(
96 ilRepositoryGUI::class,
103 $this->
ctrl->setParameterByClass(ilObjForumGUI::class, $name, null);
106 $tasks[] = $task->withUrl(
$url);
115 if ($this->accessHandler->checkAccessOfUser($userId, $operation,
'', $refId)) {
125 return (
bool) $this->
settings->get(
'save_post_drafts',
'0');
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilAccessHandler $accessHandler
isActive()
Is provider active?
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
static _getAllReferences(int $id)
get all reference ids for object ID
getTasks(int $user_id)
Get providers.
getFirstRefIdWithPermission(string $operation, int $objId, int $userId)
static _lookupObjIdForForumId(int $a_for_id)
__construct(ilTaskService $taskService, ilAccessHandler $accessHandler, ilLanguage $lng, ilSetting $settings, ilCtrlInterface $ctrl)
static getDraftInstancesByUserId(int $user_id)
Class ilForumDraftsDerivedTaskProvider.
ilTaskService $taskService