19 declare(strict_types=1);
27 protected \ILIAS\Blog\InternalGUIService
$gui;
30 protected \ilLanguage
$lng;
39 $this->gui = $DIC->blog()->internal()->gui();
44 $this->
lng->loadLanguageModule(
'blog');
57 $mgr = $DIC->blog()->internal()->domain()->posting();
58 $blogs = $mgr->searchBlogsByAuthor($user_id);
59 foreach ($blogs as $blog_id) {
60 $posts = $mgr->getAllByBlog($blog_id);
61 foreach ($posts as
$post) {
62 $post_id = $post->getId();
63 if ($post->getAuthor() !==
$user_id) {
69 if (!$active && $withdrawn ===
null) {
72 $url = $this->gui->permanentLink(
$refId)->getPermanentLink($post->getId(),
true);
75 $wspId = $this->
getWspId($blog_id, $user_id);
79 $url = $this->gui->permanentLink(0, $wspId)->getPermanentLink($post_id,
true);
83 $this->
lng->txt(
'blog_task_publishing_draft_title'),
87 $task = $this->taskService->derived()->factory()->task(
95 $tasks[] = $task->withUrl(
$url);
109 if ($this->accessHandler->checkAccessOfUser($userId, $operation,
'', $refId)) {
120 return $wst->lookupNodeId($objId);
static _lookupActive(int $a_id, string $a_parent_type, bool $a_check_scheduled_activation=false, string $a_lang="-")
lookup activation status
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getWspId(int $objId, int $userId)
static _getAllReferences(int $id)
get all reference ids for object ID
getFirstRefIdWithPermission(string $operation, int $objId, int $userId)
__construct(ilTaskService $taskService, \ilAccessHandler $accessHandler, \ilLanguage $lng)
Class ilBlogDraftsDerivedTaskProvider.
ILIAS Blog InternalGUIService $gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
isActive()
Is provider active?
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilTaskService $taskService
getTasks(int $user_id)
Get providers.