19declare(strict_types=1);
48 $this->
user = $this->domain->user();
58 $this->insertHeaderAction($list_gui);
66 $ctrl = $this->gui->ctrl();
67 $lng = $this->domain->lng();
68 if ($posting_id > 0) {
69 if ($this->blog->getNotesStatus()) {
70 $lg->enableComments(
true);
72 $lg->enableNotes(
true);
74 $lg->enableTags(
false);
82 $ctrl->setParameterByClass(
83 PresentationGUI::class,
87 $link = $ctrl->getLinkTargetByClass(
88 PresentationGUI::class,
91 $ctrl->setParameter($this,
"ntf",
"");
93 $lg->addCustomCommand($link,
"blog_notification_toggle_off");
99 $lng->txt(
"blog_notification_activated")
102 $ctrl->setParameterByClass(PresentationGUI::class,
"ntf", 2);
103 $link = $ctrl->getLinkTargetByClass(PresentationGUI::class,
"setNotification");
104 $ctrl->setParameterByClass(PresentationGUI::class,
"ntf",
"");
105 $lg->addCustomCommand($link,
"blog_notification_toggle_on");
110 $lng->txt(
"blog_notification_deactivated")
115 if ($this->perm->mayContribute()) {
117 \ilObjBlogGUI::class,
120 $ctrl->setParameterByClass(EditingGUI::class,
"bmn",
"");
121 $ctrl->setParameterByClass(EditingGUI::class,
"blpg",
"");
122 $link = $ctrl->getLinkTargetByClass($edit_path,
"");
123 $lg->addCustomCommand($link,
"blog_edit");
126 \ilObjBlogGUI::class,
128 \ilBlogPostingGUI::class,
130 $ctrl->setParameterByClass(\ilObjBlogGUI::class,
"blpg", $posting_id);
132 if ($posting_id && $this->perm->mayEditPosting($posting_id)) {
133 $link = $ctrl->getLinkTargetByClass(\ilBlogPostingGUI::class,
"edit");
134 $lg->addCustomCommand($link,
"blog_edit_posting");
138 $ctrl->setParameterByClass(PresentationGUI::class,
"ntf",
"");
@ilCtrl_Calls ILIAS\Blog\Editing\EditingGUI: ilRepositorySearchGUI, ilBlogPostingGUI
@ilCtrl_Calls ILIAS\Blog\Presentation\PresentationGUI: ilBlogPostingGUI
static hasOptOut(int $obj_id)
Is opt out (disable notification) allowed?
static hasNotification(int $type, int $user_id, int $id)
Check notification status for object and user.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)