ILIAS  release_8 Revision v8.24
class.ilObjBlog.php
Go to the documentation of this file.
1<?php
2
23class ilObjBlog extends ilObject2
24{
25 public const NAV_MODE_LIST = 1;
26 public const NAV_MODE_MONTH = 2;
28 public const ABSTRACT_DEFAULT_IMAGE_WIDTH = 144;
31 protected \ILIAS\Style\Content\DomainService $content_style_domain;
32 protected \ILIAS\Notes\Service $notes_service;
33
35 protected bool $notes = false;
36 protected string $bg_color = "";
37 protected string $font_color = "";
38 protected string $img = "";
39 protected string $ppic = "";
40 protected bool $rss = false;
41 protected bool $approval = false;
42 protected bool $style = false;
43 protected bool $abstract_shorten = false;
45 protected bool $abstract_image = false;
48 protected bool $keywords = true;
51 protected ?int $nav_mode_list_months = null;
52 protected ?int $overview_postings = 5;
53 protected bool $authors = true;
54 protected array $order = [];
55
56 public function __construct(
57 int $a_id = 0,
58 bool $a_reference = true
59 ) {
60 global $DIC;
61
62 $this->notes_service = $DIC->notes();
63 parent::__construct($a_id, $a_reference);
64 $this->rbac_review = $DIC->rbac()->review();
65
66 $this->content_style_domain = $DIC
67 ->contentStyle()
68 ->domain();
69 }
70
71 protected function initType(): void
72 {
73 $this->type = "blog";
74 }
75
76 protected function doRead(): void
77 {
79
80 $set = $ilDB->query("SELECT * FROM il_blog" .
81 " WHERE id = " . $ilDB->quote($this->id, "integer"));
82 $row = $ilDB->fetchAssoc($set);
83 $this->setProfilePicture((bool) $row["ppic"]);
84 $this->setBackgroundColor((string) $row["bg_color"]);
85 $this->setFontColor((string) $row["font_color"]);
86 $this->setImage((string) $row["img"]);
87 $this->setRSS($row["rss_active"]);
88 $this->setApproval($row["approval"]);
89 $this->setAbstractShorten($row["abs_shorten"]);
90 $this->setAbstractShortenLength($row["abs_shorten_len"]);
91 $this->setAbstractImage($row["abs_image"]);
92 $this->setAbstractImageWidth($row["abs_img_width"]);
93 $this->setAbstractImageHeight($row["abs_img_height"]);
94 $this->setKeywords($row["keywords"]);
95 $this->setAuthors($row["authors"]);
96 $this->setNavMode($row["nav_mode"]);
97 $this->setNavModeListMonthsWithPostings((int) $row["nav_list_mon_with_post"]);
98 $this->setNavModeListMonths($row["nav_list_mon"]);
99 $this->setOverviewPostings($row["ov_post"]);
100 if (trim($row["nav_order"])) {
101 $this->setOrder(explode(";", $row["nav_order"]));
102 }
103
104 // #14661
105 $this->setNotesStatus(
106 $this->notes_service->domain()->commentsActive($this->id)
107 );
108 }
109
110 protected function doCreate(bool $clone_mode = false): void
111 {
113
114 $ilDB->manipulate("INSERT INTO il_blog (id,ppic,rss_active,approval" .
115 ",abs_shorten,abs_shorten_len,abs_image,abs_img_width,abs_img_height" .
116 ",keywords,authors,nav_mode,nav_list_mon_with_post,ov_post) VALUES (" .
117 $ilDB->quote($this->id, "integer") . "," .
118 $ilDB->quote(true, "integer") . "," .
119 $ilDB->quote(true, "integer") . "," .
120 $ilDB->quote(false, "integer") . "," .
121 $ilDB->quote($this->hasAbstractShorten(), "integer") . "," .
122 $ilDB->quote($this->getAbstractShortenLength(), "integer") . "," .
123 $ilDB->quote($this->hasAbstractImage(), "integer") . "," .
124 $ilDB->quote($this->getAbstractImageWidth(), "integer") . "," .
125 $ilDB->quote($this->getAbstractImageHeight(), "integer") . "," .
126 $ilDB->quote($this->hasKeywords(), "integer") . "," .
127 $ilDB->quote($this->hasAuthors(), "integer") . "," .
128 $ilDB->quote($this->getNavMode(), "integer") . "," .
129 $ilDB->quote($this->getNavModeListMonthsWithPostings(), "integer") . "," .
130 $ilDB->quote($this->getOverviewPostings(), "integer") .
131 ")");
132
133 // #14661
134 $this->notes_service->domain()->activateComments($this->id);
135 }
136
137 protected function doDelete(): void
138 {
140
141 $this->deleteImage();
142
144
145 // remove all notifications
147
148 $ilDB->manipulate("DELETE FROM il_blog" .
149 " WHERE id = " . $ilDB->quote($this->id, "integer"));
150 }
151
152 protected function doUpdate(): void
153 {
155
156 if ($this->id) {
157 $ilDB->manipulate("UPDATE il_blog" .
158 " SET ppic = " . $ilDB->quote($this->hasProfilePicture(), "integer") .
159 ",bg_color = " . $ilDB->quote($this->getBackgroundColor(), "text") .
160 ",font_color = " . $ilDB->quote($this->getFontColor(), "text") .
161 ",img = " . $ilDB->quote($this->getImage(), "text") .
162 ",rss_active = " . $ilDB->quote($this->hasRSS(), "integer") .
163 ",approval = " . $ilDB->quote($this->hasApproval(), "integer") .
164 ",abs_shorten = " . $ilDB->quote($this->hasAbstractShorten(), "integer") .
165 ",abs_shorten_len = " . $ilDB->quote($this->getAbstractShortenLength(), "integer") .
166 ",abs_image = " . $ilDB->quote($this->hasAbstractImage(), "integer") .
167 ",abs_img_width = " . $ilDB->quote($this->getAbstractImageWidth(), "integer") .
168 ",abs_img_height = " . $ilDB->quote($this->getAbstractImageHeight(), "integer") .
169 ",keywords = " . $ilDB->quote($this->hasKeywords(), "integer") .
170 ",authors = " . $ilDB->quote($this->hasAuthors(), "integer") .
171 ",nav_mode = " . $ilDB->quote($this->getNavMode(), "integer") .
172 ",nav_list_mon_with_post = " . $ilDB->quote($this->getNavModeListMonthsWithPostings(), "integer") .
173 ",nav_list_mon = " . $ilDB->quote($this->getNavModeListMonths(), "integer") .
174 ",ov_post = " . $ilDB->quote($this->getOverviewPostings(), "integer") .
175 ",nav_order = " . $ilDB->quote(implode(";", $this->getOrder()), "text") .
176 " WHERE id = " . $ilDB->quote($this->id, "integer"));
177
178 // #14661
179 $this->notes_service->domain()->activateComments(
180 $this->id,
181 $this->getNotesStatus()
182 );
183 }
184 }
185
186 protected function doCloneObject(ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id = null): void
187 {
188 assert($new_obj instanceof ilObjBlog);
189 // banner?
190 $img = $this->getImage();
191 if ($img) {
192 $new_obj->setImage($img);
193
194 $source = self::initStorage($this->getId());
195 $target = $new_obj->initStorage($new_obj->getId());
196
197 copy($source . $img, $target . $img);
198 }
199
200 $new_obj->setNotesStatus($this->getNotesStatus());
201 $new_obj->setProfilePicture($this->hasProfilePicture());
202 $new_obj->setBackgroundColor($this->getBackgroundColor());
203 $new_obj->setFontColor($this->getFontColor());
204 $new_obj->setRSS($this->hasRSS());
205 $new_obj->setApproval($this->hasApproval());
206 $new_obj->setAbstractShorten($this->hasAbstractShorten());
207 $new_obj->setAbstractShortenLength($this->getAbstractShortenLength());
208 $new_obj->setAbstractImage($this->hasAbstractImage());
209 $new_obj->setAbstractImageWidth($this->getAbstractImageWidth());
210 $new_obj->setAbstractImageHeight($this->getAbstractImageHeight());
211 $new_obj->update();
212
213 // set/copy stylesheet
214 $this->content_style_domain->styleForObjId($this->getId())->cloneTo($new_obj->getId());
215 }
216
217 public function getNotesStatus(): bool
218 {
219 return $this->notes;
220 }
221
222 public function setNotesStatus(bool $a_status): void
223 {
224 $this->notes = $a_status;
225 }
226
227 public function hasProfilePicture(): bool
228 {
229 return $this->ppic;
230 }
231
232 public function setProfilePicture(bool $a_status): void
233 {
234 $this->ppic = $a_status;
235 }
236
237 public function getBackgroundColor(): string
238 {
239 if (!$this->bg_color) {
240 $this->bg_color = "ffffff";
241 }
242 return $this->bg_color;
243 }
244
245 public function setBackgroundColor(string $a_value): void
246 {
247 $this->bg_color = $a_value;
248 }
249
250 public function getFontColor(): string
251 {
252 if (!$this->font_color) {
253 $this->font_color = "505050";
254 }
255 return $this->font_color;
256 }
257
258 public function setFontColor(string $a_value): void
259 {
260 $this->font_color = $a_value;
261 }
262
263 public function getImage(): string
264 {
265 return $this->img;
266 }
267
268 public function setImage(string $a_value): void
269 {
270 $this->img = $a_value;
271 }
272
273 public function getImageFullPath(
274 bool $a_as_thumb = false
275 ): string {
276 if ($this->img) {
277 $path = self::initStorage($this->id);
278 if (!$a_as_thumb) {
279 return $path . $this->img;
280 }
281
282 return $path . "thb_" . $this->img;
283 }
284 return "";
285 }
286
287 public function deleteImage(): void
288 {
289 if ($this->id) {
290 $storage = new ilFSStorageBlog($this->id);
291 $storage->delete();
292
293 $this->setImage("");
294
295 $this->handleQuotaUpdate();
296 }
297 }
298
302 public static function initStorage(
303 int $a_id,
304 string $a_subdir = null
305 ): string {
306 $storage = new ilFSStorageBlog($a_id);
307 $storage->create();
308
309 $path = $storage->getAbsolutePath() . "/";
310
311 if ($a_subdir) {
312 $path .= $a_subdir . "/";
313
314 if (!is_dir($path) && !mkdir($path) && !is_dir($path)) {
315 throw new \RuntimeException(sprintf('Directory "%s" was not created', $path));
316 }
317 }
318
319 return $path;
320 }
321
325 public function uploadImage(array $a_upload): bool
326 {
327 if (!$this->id) {
328 return false;
329 }
330
331 $this->deleteImage();
332
333 // #10074
334 $clean_name = preg_replace("/[^a-zA-Z0-9\_\.\-]/", "", $a_upload["name"]);
335
336 $path = self::initStorage($this->id);
337 $original = "org_" . $this->id . "_" . $clean_name;
338 $thumb = "thb_" . $this->id . "_" . $clean_name;
339 $processed = $this->id . "_" . $clean_name;
340
341 if (ilFileUtils::moveUploadedFile($a_upload["tmp_name"], $original, $path . $original)) {
342 chmod($path . $original, 0770);
343
344 $blga_set = new ilSetting("blga");
345 /* as banner height should overflow, we only handle width
346 $dimensions = $blga_set->get("banner_width")."x".
347 $blga_set->get("banner_height");
348 */
349 $dimensions = $blga_set->get("banner_width");
350
351 // take quality 100 to avoid jpeg artefacts when uploading jpeg files
352 // taking only frame [0] to avoid problems with animated gifs
353 $original_file = ilShellUtil::escapeShellArg($path . $original);
354 $thumb_file = ilShellUtil::escapeShellArg($path . $thumb);
355 $processed_file = ilShellUtil::escapeShellArg($path . $processed);
356 ilShellUtil::execConvert($original_file . "[0] -geometry 100x100 -quality 100 JPEG:" . $thumb_file);
358 $original_file . "[0] -geometry " . $dimensions . " -quality 100 JPEG:" . $processed_file
359 );
360
361 $this->setImage($processed);
362
363 $this->handleQuotaUpdate();
364
365 return true;
366 }
367 return false;
368 }
369
370 public function hasRSS(): bool
371 {
372 return $this->rss;
373 }
374
375 public function setRSS(bool $a_status): void
376 {
377 $this->rss = $a_status;
378 }
379
380 public function hasApproval(): bool
381 {
382 return $this->approval;
383 }
384
385 public function setApproval(bool $a_status): void
386 {
387 $this->approval = $a_status;
388 }
389
390
391 public function hasAbstractShorten(): bool
392 {
393 return $this->abstract_shorten;
394 }
395
396 public function setAbstractShorten(bool $a_value): void
397 {
398 $this->abstract_shorten = $a_value;
399 }
400
401 public function getAbstractShortenLength(): int
402 {
403 return $this->abstract_shorten_length;
404 }
405
406 public function setAbstractShortenLength(int $a_value): void
407 {
408 $this->abstract_shorten_length = $a_value;
409 }
410
411 public function hasAbstractImage(): bool
412 {
413 return $this->abstract_image;
414 }
415
416 public function setAbstractImage(bool $a_value): void
417 {
418 $this->abstract_image = $a_value;
419 }
420
421 public function getAbstractImageWidth(): int
422 {
423 return $this->abstract_image_width;
424 }
425
426 public function setAbstractImageWidth(int $a_value): void
427 {
428 $this->abstract_image_width = $a_value;
429 }
430
431 public function getAbstractImageHeight(): int
432 {
433 return $this->abstract_image_height;
434 }
435
436 public function setAbstractImageHeight(int $a_value): void
437 {
438 $this->abstract_image_height = $a_value;
439 }
440
441 public function setKeywords(bool $a_value): void
442 {
443 $this->keywords = $a_value;
444 }
445
446 public function hasKeywords(): bool
447 {
448 return $this->keywords;
449 }
450
451 public function setAuthors(bool $a_value): void
452 {
453 $this->authors = $a_value;
454 }
455
456 public function hasAuthors(): bool
457 {
458 return $this->authors;
459 }
460
461 public function setNavMode(int $a_value): void
462 {
463 if (in_array($a_value, array(self::NAV_MODE_LIST, self::NAV_MODE_MONTH))) {
464 $this->nav_mode = $a_value;
465 }
466 }
467
468 public function getNavMode(): int
469 {
470 return $this->nav_mode;
471 }
472
473 public function setNavModeListMonthsWithPostings(int $a_value): void
474 {
475 $this->nav_mode_list_months_with_post = $a_value;
476 }
477
479 {
480 return $this->nav_mode_list_months_with_post;
481 }
482
483 public function setNavModeListMonths(?int $a_value): void
484 {
485 $this->nav_mode_list_months = $a_value;
486 }
487
488 public function getNavModeListMonths(): ?int
489 {
490 return $this->nav_mode_list_months;
491 }
492
493 public function setOverviewPostings(?int $a_value): void
494 {
495 $this->overview_postings = $a_value;
496 }
497
498 public function getOverviewPostings(): ?int
499 {
500 return $this->overview_postings;
501 }
502
503 public function setOrder(array $a_values = []): void
504 {
505 $this->order = $a_values;
506 }
507
508 public function getOrder(): array
509 {
510 return $this->order;
511 }
512
513 public static function sendNotification(
514 string $a_action,
515 bool $a_in_wsp,
516 int $a_blog_node_id,
517 int $a_posting_id,
518 ?string $a_comment = null
519 ): void {
520 global $DIC;
521
522 $ilUser = $DIC->user();
523
524 // get blog object id (repository or workspace)
525 if ($a_in_wsp) {
526 $tree = new ilWorkspaceTree($ilUser->getId()); // owner of tree is irrelevant
527 $blog_obj_id = $tree->lookupObjectId($a_blog_node_id);
528 $access_handler = new ilWorkspaceAccessHandler($tree);
529 } else {
530 $blog_obj_id = ilObject::_lookupObjId($a_blog_node_id);
531 $access_handler = null;
532 }
533 if (!$blog_obj_id) {
534 return;
535 }
536
537 $posting = new ilBlogPosting($a_posting_id);
538
539 // #11138
540 $ignore_threshold = ($a_action === "comment");
541
542 $admin_only = false;
543
544 // approval handling
545 if (!$posting->isApproved()) {
546 $blog = new self($blog_obj_id, false);
547 if ($blog->hasApproval()) {
548 switch ($a_action) {
549 case "update":
550 // un-approved posting was updated - no notifications
551 return;
552
553 case "new":
554 // un-approved posting was activated - admin-only notification
555 $admin_only = true;
556 $ignore_threshold = true;
557 $a_action = "approve";
558 break;
559 }
560 }
561 }
562
563 // create/update news item (only in repository)
564 if (!$a_in_wsp &&
565 in_array($a_action, array("update", "new"))) {
566 $posting->handleNews(($a_action === "update"));
567 }
568
569 // recipients
572 $blog_obj_id,
573 $a_posting_id,
574 $ignore_threshold
575 );
576 if (!count($users)) {
577 return;
578 }
579
580 $ntf = new ilSystemNotification($a_in_wsp);
581 $ntf->setLangModules(array("blog"));
582 $ntf->setRefId($a_blog_node_id);
583 $ntf->setChangedByUserId($ilUser->getId());
584 $ntf->setSubjectLangId('blog_change_notification_subject');
585 $ntf->setIntroductionLangId('blog_change_notification_body_' . $a_action);
586 $ntf->addAdditionalInfo('blog_posting', $posting->getTitle());
587 if ($a_comment) {
588 $ntf->addAdditionalInfo('comment', $a_comment, true);
589 }
590 $ntf->setGotoLangId('blog_change_notification_link');
591 $ntf->setReasonLangId('blog_change_notification_reason');
592
593 $abstract = $posting->getNotificationAbstract();
594 if ($abstract) {
595 $ntf->addAdditionalInfo('content', $abstract, true);
596 }
597
598 $notified = $ntf->sendMailAndReturnRecipients(
599 $users,
600 "_" . $a_posting_id,
601 ($admin_only ? "write" : "read")
602 );
603
604 // #14387
605 if (count($notified)) {
606 ilNotification::updateNotificationTime(ilNotification::TYPE_BLOG, $blog_obj_id, $notified, $a_posting_id);
607 }
608 }
609
613 public static function deliverRSS(string $a_wsp_id): void
614 {
615 global $DIC;
616
617 $tpl = $DIC["tpl"];
618 $ilSetting = $DIC->settings();
619
620 if (!$ilSetting->get('enable_global_profiles')) {
621 return;
622 }
623
624 // #10827
625 if (substr($a_wsp_id, -4) !== "_cll") {
626 $wsp_id = new ilWorkspaceTree(0);
627 $obj_id = $wsp_id->lookupObjectId((int) $a_wsp_id);
628 $is_wsp = "_wsp";
629 } else {
630 $a_wsp_id = substr($a_wsp_id, 0, -4);
631 $obj_id = ilObject::_lookupObjId((int) $a_wsp_id);
632 $is_wsp = null;
633 }
634 if (!$obj_id) {
635 return;
636 }
637
638 $blog = new self($obj_id, false);
639 if (!$blog->hasRSS()) {
640 return;
641 }
642
643 $feed = new ilFeedWriter();
644
645 $url = ilLink::_getStaticLink($a_wsp_id, "blog", true, (string) $is_wsp);
646 $url = str_replace("&", "&amp;", $url);
647
648 // #11870
649 $feed->setChannelTitle(str_replace("&", "&amp;", $blog->getTitle()));
650 $feed->setChannelDescription(str_replace("&", "&amp;", $blog->getDescription()));
651 $feed->setChannelLink($url);
652
653 // needed for blogpostinggui / pagegui
654 $tpl = new ilGlobalTemplate("tpl.main.html", true, true);
655
656 foreach (ilBlogPosting::getAllPostings($obj_id) as $item) {
657 $id = $item["id"];
658
659 // only published items
660 $is_active = ilBlogPosting::_lookupActive($id, "blp");
661 if (!$is_active) {
662 continue;
663 }
664
665 // #16434
666 $snippet = strip_tags(ilBlogPostingGUI::getSnippet($id), "<br><br/><div><p>");
667 $snippet = str_replace("&", "&amp;", $snippet);
668 $snippet = "<![CDATA[" . $snippet . "]]>";
669
670 $url = ilLink::_getStaticLink($a_wsp_id, "blog", true, "_" . $id . $is_wsp);
671 $url = str_replace("&", "&amp;", $url);
672
673 $feed_item = new ilFeedItem();
674 $feed_item->setTitle(str_replace("&", "&amp;", $item["title"])); // #16022
675 $feed_item->setDate($item["created"]->get(IL_CAL_DATETIME));
676 $feed_item->setDescription($snippet);
677 $feed_item->setLink($url);
678 $feed_item->setAbout($url);
679 $feed->addItem($feed_item);
680 }
681
682 $feed->showFeed();
683 exit();
684 }
685
686 public function initDefaultRoles(): void
687 {
689 'il_blog_contributor_' . $this->getRefId(),
690 "Contributor of blog obj_no." . $this->getId(),
691 'il_blog_contributor',
692 $this->getRefId()
693 );
694
696 'il_blog_editor_' . $this->getRefId(),
697 "Editor of blog obj_no." . $this->getId(),
698 'il_blog_editor',
699 $this->getRefId()
700 );
701 }
702
703 public function getLocalContributorRole(int $a_node_id): int
704 {
705 foreach ($this->rbac_review->getLocalRoles($a_node_id) as $role_id) {
706 if (strpos(ilObject::_lookupTitle($role_id), "il_blog_contributor") === 0) {
707 return $role_id;
708 }
709 }
710 return 0;
711 }
712
713 public function getLocalEditorRole(int $a_node_id): int
714 {
715 foreach ($this->rbac_review->getLocalRoles($a_node_id) as $role_id) {
716 if (strpos(ilObject::_lookupTitle($role_id), "il_blog_editor") === 0) {
717 return $role_id;
718 }
719 }
720 return 0;
721 }
722
723 public function getAllLocalRoles(int $a_node_id): array
724 {
725 $res = array();
726 foreach ($this->rbac_review->getLocalRoles($a_node_id) as $role_id) {
728 }
729
730 asort($res);
731 return $res;
732 }
733
734 public function getRolesWithContributeOrRedact(int $a_node_id): array
735 {
736 $contr_op_id = ilRbacReview::_getOperationIdByName("contribute");
737 $redact_op_id = ilRbacReview::_getOperationIdByName("redact");
738 $contr_role_id = $this->getLocalContributorRole($a_node_id);
739 $editor_role_id = $this->getLocalEditorRole($a_node_id);
740
741 $res = array();
742 foreach ($this->rbac_review->getParentRoleIds($a_node_id) as $role_id => $role) {
743 if ($role_id != $contr_role_id &&
744 $role_id != $editor_role_id) {
745 $all_ops = $this->rbac_review->getActiveOperationsOfRole($a_node_id, $role_id);
746 if (in_array($contr_op_id, $all_ops) ||
747 in_array($redact_op_id, $all_ops)) {
748 $res[$role_id] = ilObjRole::_getTranslation($role["title"]);
749 }
750 }
751 }
752
753 return $res;
754 }
755
756 protected function handleQuotaUpdate(): void
757 {
758 }
759}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
const IL_CAL_DATETIME
static getSnippet(int $a_id, bool $a_truncate=false, int $a_truncate_length=500, string $a_truncate_sign="...", bool $a_include_picture=false, int $a_picture_width=144, int $a_picture_height=144, string $a_export_directory=null)
Get first text paragraph of page.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getAllPostings(int $a_blog_id, int $a_limit=1000, int $a_offset=0)
Get all postings of blog.
static deleteAllBlogPostings(int $a_blog_id)
Delete all postings for blog.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static moveUploadedFile(string $a_file, string $a_name, string $a_target, bool $a_raise_errors=true, string $a_mode="move_uploaded")
move uploaded file
special template class to simplify handling of ITX/PEAR
static updateNotificationTime(int $type, int $id, array $user_ids, ?int $page_id=null, bool $activate_new_entries=true)
Update the last mail timestamp for given object and users.
static getNotificationsForObject(int $type, int $id, ?int $page_id=null, bool $ignore_threshold=false)
Get all users/recipients for given object.
static removeForObject(int $type, int $id)
Remove all notifications for given object.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getRolesWithContributeOrRedact(int $a_node_id)
setImage(string $a_value)
string $bg_color
setRSS(bool $a_status)
getLocalEditorRole(int $a_node_id)
getImageFullPath(bool $a_as_thumb=false)
getAllLocalRoles(int $a_node_id)
setBackgroundColor(string $a_value)
setNavMode(int $a_value)
setAbstractImage(bool $a_value)
bool $abstract_shorten
setNotesStatus(bool $a_status)
int $abstract_shorten_length
setNavModeListMonthsWithPostings(int $a_value)
doCloneObject(ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id=null)
setKeywords(bool $a_value)
const NAV_MODE_MONTH
ILIAS Style Content DomainService $content_style_domain
__construct(int $a_id=0, bool $a_reference=true)
Constructor.
doCreate(bool $clone_mode=false)
int $abstract_image_height
static sendNotification(string $a_action, bool $a_in_wsp, int $a_blog_node_id, int $a_posting_id, ?string $a_comment=null)
setApproval(bool $a_status)
int $nav_mode_list_postings
int $nav_mode_list_months_with_post
setAbstractShortenLength(int $a_value)
const NAV_MODE_LIST
initDefaultRoles()
init default roles settings Purpose of this function is to create a local role folder and local roles...
uploadImage(array $a_upload)
Upload new image file.
getLocalContributorRole(int $a_node_id)
setOrder(array $a_values=[])
setAuthors(bool $a_value)
getAbstractShortenLength()
const ABSTRACT_DEFAULT_SHORTEN_LENGTH
string $font_color
setFontColor(string $a_value)
const ABSTRACT_DEFAULT_IMAGE_WIDTH
setNavModeListMonths(?int $a_value)
int $overview_postings
const NAV_MODE_LIST_DEFAULT_POSTINGS
int $abstract_image_width
bool $abstract_image
ILIAS Notes Service $notes_service
setOverviewPostings(?int $a_value)
setProfilePicture(bool $a_status)
static deliverRSS(string $a_wsp_id)
Deliver blog as rss feed.
setAbstractImageHeight(int $a_value)
setAbstractImageWidth(int $a_value)
setAbstractShorten(bool $a_value)
int $nav_mode_list_months
static initStorage(int $a_id, string $a_subdir=null)
Init file system storage.
getNavModeListMonthsWithPostings()
const ABSTRACT_DEFAULT_IMAGE_HEIGHT
static createDefaultRole(string $a_title, string $a_description, string $a_tpl_name, int $a_ref_id)
static _getTranslation(string $a_role_title)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
ilDBInterface $db
static _lookupActive(int $a_id, string $a_parent_type, bool $a_check_scheduled_activation=false, string $a_lang="-")
lookup activation status
static _getOperationIdByName(string $a_operation)
get operation id by name of operation
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static escapeShellArg(string $a_arg)
static execConvert(string $args)
execute convert command
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
global $DIC
Definition: feed.php:28
$ilUser
Definition: imgupload.php:34
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
exit
Definition: login.php:28
$path
Definition: ltiservices.php:32
$res
Definition: ltiservices.php:69
$source
Definition: metadata.php:93
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $ilSetting
Definition: privfeed.php:17
$url