19declare(strict_types=1);
27 protected \ILIAS\Blog\InternalDomainService
$domain;
28 protected \ILIAS\Blog\InternalGUIService
$gui;
31 protected \ilLanguage
$lng;
47 $this->
lng->loadLanguageModule(
'blog');
59 $mgr = $this->domain->posting();
60 $blogs = $mgr->searchBlogsByAuthor(
$user_id);
61 foreach ($blogs as $blog_id) {
62 $posts = $mgr->getAllByBlog($blog_id);
63 foreach ($posts as $post) {
64 $post_id = $post->getId();
65 if ($post->getAuthor() !==
$user_id) {
69 $active = $this->domain->pageManager()->lookupActive($post->getId(),
"blp");
71 if (!$active && $withdrawn ===
null) {
74 $url = $this->gui->permanentLink(
$refId)->getPermanentLink($post->getId(),
true);
81 $url = $this->gui->permanentLink(0, $wspId)->getPermanentLink($post_id,
true);
85 $this->
lng->txt(
'blog_task_publishing_draft_title'),
89 $task = $this->taskService->derived()->factory()->task(
97 $tasks[] = $task->withUrl($url);
111 if ($this->accessHandler->checkAccessOfUser($userId, $operation,
'',
$refId)) {
122 return $wst->lookupNodeId(
$objId);
Class ilBlogDraftsDerivedTaskProvider.
isActive()
Is provider active?
ILIAS Blog InternalDomainService $domain
ilTaskService $taskService
ILIAS Blog InternalGUIService $gui
getWspId(int $objId, int $userId)
getFirstRefIdWithPermission(string $operation, int $objId, int $userId)
__construct(ilTaskService $taskService, \ilAccessHandler $accessHandler, \ilLanguage $lng)
getTasks(int $user_id)
Get providers.
Class ilObject Basic functions for all objects.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
foreach( $report as $row)
Combines all available interfaces which can be called via global $ilAccess.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...