ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilObjBlog.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
10class ilObjBlog extends ilObject2
11{
12
16 public function __construct($a_id = 0, $a_reference = true)
17 {
18 global $DIC;
19
20 parent::__construct($a_id, $a_reference);
21 $this->rbacreview = $DIC->rbac()->review();
22 }
23
24 protected $notes; // [bool]
25 protected $bg_color; // [string]
26 protected $font_color; // [string]
27 protected $img; // [string]
28 protected $ppic; // [string]
29 protected $rss; // [bool]
30 protected $approval; // [bool]
31 protected $style; // [bool]
32 protected $abstract_shorten = false; // [bool]
34 protected $abstract_image = false; // [bool]
37 protected $keywords = true; // [bool]
38 protected $nav_mode = self::NAV_MODE_LIST; // [int]
40 protected $nav_mode_list_months; // [int]
41 protected $overview_postings = 5; // [int]
42 protected $authors = true; // [bool]
43 protected $order;
44
45 const NAV_MODE_LIST = 1;
46 const NAV_MODE_MONTH = 2;
47
52
53 public function initType()
54 {
55 $this->type = "blog";
56 }
57
58 protected function doRead()
59 {
61
62 $set = $ilDB->query("SELECT * FROM il_blog" .
63 " WHERE id = " . $ilDB->quote($this->id, "integer"));
64 $row = $ilDB->fetchAssoc($set);
65 $this->setProfilePicture((bool) $row["ppic"]);
66 $this->setBackgroundColor($row["bg_color"]);
67 $this->setFontColor($row["font_color"]);
68 $this->setImage($row["img"]);
69 $this->setRSS($row["rss_active"]);
70 $this->setApproval($row["approval"]);
71 $this->setAbstractShorten($row["abs_shorten"]);
72 $this->setAbstractShortenLength($row["abs_shorten_len"]);
73 $this->setAbstractImage($row["abs_image"]);
74 $this->setAbstractImageWidth($row["abs_img_width"]);
75 $this->setAbstractImageHeight($row["abs_img_height"]);
76 $this->setKeywords($row["keywords"]);
77 $this->setAuthors($row["authors"]);
78 $this->setNavMode($row["nav_mode"]);
79 $this->setNavModeListMonthsWithPostings($row["nav_list_mon_with_post"]);
80 $this->setNavModeListMonths($row["nav_list_mon"]);
81 $this->setOverviewPostings($row["ov_post"]);
82 if (trim($row["nav_order"])) {
83 $this->setOrder(explode(";", $row["nav_order"]));
84 }
85
86 // #14661
87 $this->setNotesStatus(ilNote::commentsActivated($this->id, 0, "blog"));
88
90 }
91
92 protected function doCreate()
93 {
95
96 $ilDB->manipulate("INSERT INTO il_blog (id,ppic,rss_active,approval" .
97 ",abs_shorten,abs_shorten_len,abs_image,abs_img_width,abs_img_height" .
98 ",keywords,authors,nav_mode,nav_list_mon_with_post,ov_post) VALUES (" .
99 $ilDB->quote($this->id, "integer") . "," .
100 $ilDB->quote(true, "integer") . "," .
101 $ilDB->quote(true, "integer") . "," .
102 $ilDB->quote(false, "integer") . "," .
103 $ilDB->quote($this->hasAbstractShorten(), "integer") . "," .
104 $ilDB->quote($this->getAbstractShortenLength(), "integer") . "," .
105 $ilDB->quote($this->hasAbstractImage(), "integer") . "," .
106 $ilDB->quote($this->getAbstractImageWidth(), "integer") . "," .
107 $ilDB->quote($this->getAbstractImageHeight(), "integer") . "," .
108 $ilDB->quote($this->hasKeywords(), "integer") . "," .
109 $ilDB->quote($this->hasAuthors(), "integer") . "," .
110 $ilDB->quote($this->getNavMode(), "integer") . "," .
111 $ilDB->quote($this->getNavModeListMonthsWithPostings(), "integer") . "," .
112 $ilDB->quote($this->getOverviewPostings(), "integer") .
113 ")");
114
115 // #14661
116 ilNote::activateComments($this->id, 0, "blog", true);
117 }
118
119 protected function doDelete()
120 {
122
123 $this->deleteImage();
124
126
127 // remove all notifications
129
130 $ilDB->manipulate("DELETE FROM il_blog" .
131 " WHERE id = " . $ilDB->quote($this->id, "integer"));
132 }
133
134 protected function doUpdate()
135 {
137
138 if ($this->id) {
139 $ilDB->manipulate("UPDATE il_blog" .
140 " SET ppic = " . $ilDB->quote($this->hasProfilePicture(), "integer") .
141 ",bg_color = " . $ilDB->quote($this->getBackgroundColor(), "text") .
142 ",font_color = " . $ilDB->quote($this->getFontcolor(), "text") .
143 ",img = " . $ilDB->quote($this->getImage(), "text") .
144 ",rss_active = " . $ilDB->quote($this->hasRSS(), "integer") .
145 ",approval = " . $ilDB->quote($this->hasApproval(), "integer") .
146 ",abs_shorten = " . $ilDB->quote($this->hasAbstractShorten(), "integer") .
147 ",abs_shorten_len = " . $ilDB->quote($this->getAbstractShortenLength(), "integer") .
148 ",abs_image = " . $ilDB->quote($this->hasAbstractImage(), "integer") .
149 ",abs_img_width = " . $ilDB->quote($this->getAbstractImageWidth(), "integer") .
150 ",abs_img_height = " . $ilDB->quote($this->getAbstractImageHeight(), "integer") .
151 ",keywords = " . $ilDB->quote($this->hasKeywords(), "integer") .
152 ",authors = " . $ilDB->quote($this->hasAuthors(), "integer") .
153 ",nav_mode = " . $ilDB->quote($this->getNavMode(), "integer") .
154 ",nav_list_mon_with_post = " . $ilDB->quote($this->getNavModeListMonthsWithPostings(), "integer") .
155 ",nav_list_mon = " . $ilDB->quote($this->getNavModeListMonths(), "integer") .
156 ",ov_post = " . $ilDB->quote($this->getOverviewPostings(), "integer") .
157 ",nav_order = " . $ilDB->quote(implode(";", $this->getOrder()), "text") .
158 " WHERE id = " . $ilDB->quote($this->id, "integer"));
159
160 // #14661
161 ilNote::activateComments($this->id, 0, "blog", $this->getNotesStatus());
162
164 }
165 }
166
167 protected function doCloneObject($new_obj, $a_target_id, $a_copy_id = null, $a_omit_tree = false)
168 {
169 // banner?
170 $img = $this->getImage();
171 if ($img) {
172 $new_obj->setImage($img);
173
174 $source = $this->initStorage($this->getId());
175 $target = $new_obj->initStorage($new_obj->getId());
176
177 copy($source . $img, $target . $img);
178 }
179
180 $new_obj->setNotesStatus($this->getNotesStatus());
181 $new_obj->setProfilePicture($this->hasProfilePicture());
182 $new_obj->setBackgroundColor($this->getBackgroundColor());
183 $new_obj->setFontColor($this->getFontColor());
184 $new_obj->setRSS($this->hasRSS());
185 $new_obj->setApproval($this->hasApproval());
186 $new_obj->setAbstractShorten($this->hasAbstractShorten());
187 $new_obj->setAbstractShortenLength($this->getAbstractShortenLength());
188 $new_obj->setAbstractImage($this->hasAbstractImage());
189 $new_obj->setAbstractImageWidth($this->getAbstractImageWidth());
190 $new_obj->setAbstractImageHeight($this->getAbstractImageHeight());
191 $new_obj->update();
192
193 // set/copy stylesheet
194 $style_id = $this->getStyleSheetId();
195 if ($style_id > 0 && !ilObjStyleSheet::_lookupStandard($style_id)) {
196 $style_obj = ilObjectFactory::getInstanceByObjId($style_id);
197 $new_id = $style_obj->ilClone();
198 $new_obj->setStyleSheetId($new_id);
199 $new_obj->update();
200 }
201 }
202
208 public function getNotesStatus()
209 {
210 return $this->notes;
211 }
212
218 public function setNotesStatus($a_status)
219 {
220 $this->notes = (bool) $a_status;
221 }
222
228 public function hasProfilePicture()
229 {
230 return $this->ppic;
231 }
232
238 public function setProfilePicture($a_status)
239 {
240 $this->ppic = (bool) $a_status;
241 }
242
248 public function getBackgroundColor()
249 {
250 if (!$this->bg_color) {
251 $this->bg_color = "ffffff";
252 }
253 return $this->bg_color;
254 }
255
261 public function setBackgroundColor($a_value)
262 {
263 $this->bg_color = (string) $a_value;
264 }
265
271 public function getFontColor()
272 {
273 if (!$this->font_color) {
274 $this->font_color = "505050";
275 }
276 return $this->font_color;
277 }
278
284 public function setFontColor($a_value)
285 {
286 $this->font_color = (string) $a_value;
287 }
288
294 public function getImage()
295 {
296 return $this->img;
297 }
298
304 public function setImage($a_value)
305 {
306 $this->img = (string) $a_value;
307 }
308
314 public function getImageFullPath($a_as_thumb = false)
315 {
316 if ($this->img) {
317 $path = $this->initStorage($this->id);
318 if (!$a_as_thumb) {
319 return $path . $this->img;
320 } else {
321 return $path . "thb_" . $this->img;
322 }
323 }
324 }
325
329 public function deleteImage()
330 {
331 if ($this->id) {
332 $storage = new ilFSStorageBlog($this->id);
333 $storage->delete();
334
335 $this->setImage(null);
336
337 $this->handleQuotaUpdate();
338 }
339 }
340
348 public static function initStorage($a_id, $a_subdir = null)
349 {
350 $storage = new ilFSStorageBlog($a_id);
351 $storage->create();
352
353 $path = $storage->getAbsolutePath() . "/";
354
355 if ($a_subdir) {
356 $path .= $a_subdir . "/";
357
358 if (!is_dir($path)) {
359 mkdir($path);
360 }
361 }
362
363 return $path;
364 }
365
372 public function uploadImage(array $a_upload)
373 {
374 if (!$this->id) {
375 return false;
376 }
377
378 $this->deleteImage();
379
380 // #10074
381 $clean_name = preg_replace("/[^a-zA-Z0-9\_\.\-]/", "", $a_upload["name"]);
382
383 $path = $this->initStorage($this->id);
384 $original = "org_" . $this->id . "_" . $clean_name;
385 $thumb = "thb_" . $this->id . "_" . $clean_name;
386 $processed = $this->id . "_" . $clean_name;
387
388 if (ilUtil::moveUploadedFile($a_upload["tmp_name"], $original, $path . $original)) {
389 chmod($path . $original, 0770);
390
391 $blga_set = new ilSetting("blga");
392 /* as banner height should overflow, we only handle width
393 $dimensions = $blga_set->get("banner_width")."x".
394 $blga_set->get("banner_height");
395 */
396 $dimensions = $blga_set->get("banner_width");
397
398 // take quality 100 to avoid jpeg artefacts when uploading jpeg files
399 // taking only frame [0] to avoid problems with animated gifs
400 $original_file = ilUtil::escapeShellArg($path . $original);
401 $thumb_file = ilUtil::escapeShellArg($path . $thumb);
402 $processed_file = ilUtil::escapeShellArg($path . $processed);
403 ilUtil::execConvert($original_file . "[0] -geometry 100x100 -quality 100 JPEG:" . $thumb_file);
404 ilUtil::execConvert($original_file . "[0] -geometry " . $dimensions . " -quality 100 JPEG:" . $processed_file);
405
406 $this->setImage($processed);
407
408 $this->handleQuotaUpdate();
409
410 return true;
411 }
412 return false;
413 }
414
420 public function hasRSS()
421 {
422 return $this->rss;
423 }
424
430 public function setRSS($a_status)
431 {
432 $this->rss = (bool) $a_status;
433 }
434
440 public function hasApproval()
441 {
442 return (bool) $this->approval;
443 }
444
450 public function setApproval($a_status)
451 {
452 $this->approval = (bool) $a_status;
453 }
454
460 public function getStyleSheetId()
461 {
462 return (int) $this->style;
463 }
464
470 public function setStyleSheetId($a_style)
471 {
472 $this->style = (int) $a_style;
473 }
474
475 public function hasAbstractShorten()
476 {
478 }
479
480 public function setAbstractShorten($a_value)
481 {
482 $this->abstract_shorten = (bool) $a_value;
483 }
484
485 public function getAbstractShortenLength()
486 {
488 }
489
490 public function setAbstractShortenLength($a_value)
491 {
492 $this->abstract_shorten_length = (int) $a_value;
493 }
494
495 public function hasAbstractImage()
496 {
498 }
499
500 public function setAbstractImage($a_value)
501 {
502 $this->abstract_image = (bool) $a_value;
503 }
504
505 public function getAbstractImageWidth()
506 {
508 }
509
510 public function setAbstractImageWidth($a_value)
511 {
512 $this->abstract_image_width = (int) $a_value;
513 }
514
515 public function getAbstractImageHeight()
516 {
518 }
519
520 public function setAbstractImageHeight($a_value)
521 {
522 $this->abstract_image_height = (int) $a_value;
523 }
524
525 public function setKeywords($a_value)
526 {
527 $this->keywords = (bool) $a_value;
528 }
529
530 public function hasKeywords()
531 {
532 return $this->keywords;
533 }
534
535 public function setAuthors($a_value)
536 {
537 $this->authors = (bool) $a_value;
538 }
539
540 public function hasAuthors()
541 {
542 return $this->authors;
543 }
544
545 public function setNavMode($a_value)
546 {
547 $a_value = (int) $a_value;
548 if (in_array($a_value, array(self::NAV_MODE_LIST, self::NAV_MODE_MONTH))) {
549 $this->nav_mode = $a_value;
550 }
551 }
552
553 public function getNavMode()
554 {
555 return $this->nav_mode;
556 }
557
558 public function setNavModeListMonthsWithPostings($a_value)
559 {
560 $this->nav_mode_list_months_with_post = (int) $a_value;
561 }
562
564 {
565 return $this->nav_mode_list_months_with_post;
566 }
567
568 public function setNavModeListMonths($a_value)
569 {
570 if (!$a_value) {
571 $a_value = null;
572 } else {
573 $a_value = (int) $a_value;
574 }
575 $this->nav_mode_list_months = $a_value;
576 }
577
578 public function getNavModeListMonths()
579 {
581 }
582
583 public function setOverviewPostings($a_value)
584 {
585 if (!$a_value) {
586 $a_value = null;
587 } else {
588 $a_value = (int) $a_value;
589 }
590 $this->overview_postings = $a_value;
591 }
592
593 public function getOverviewPostings()
594 {
596 }
597
598 public function setOrder(array $a_values = null)
599 {
600 $this->order = $a_values;
601 }
602
603 public function getOrder()
604 {
605 return (array) $this->order;
606 }
607
608 public static function sendNotification($a_action, $a_in_wsp, $a_blog_node_id, $a_posting_id, $a_comment = null)
609 {
610 global $DIC;
611
612 $ilUser = $DIC->user();
613
614 // get blog object id (repository or workspace)
615 if ($a_in_wsp) {
616 $tree = new ilWorkspaceTree($ilUser->getId()); // owner of tree is irrelevant
617 $blog_obj_id = $tree->lookupObjectId($a_blog_node_id);
618 $access_handler = new ilWorkspaceAccessHandler($tree);
619 } else {
620 $blog_obj_id = ilObject::_lookupObjId($a_blog_node_id);
621 $access_handler = null;
622 }
623 if (!$blog_obj_id) {
624 return;
625 }
626
627 $posting = new ilBlogPosting($a_posting_id);
628
629 // #11138
630 $ignore_threshold = ($a_action == "comment");
631
632 $admin_only = false;
633
634 // approval handling
635 if (!$posting->isApproved()) {
636 $blog = new self($blog_obj_id, false);
637 if ($blog->hasApproval()) {
638 switch ($a_action) {
639 case "update":
640 // un-approved posting was updated - no notifications
641 return;
642
643 case "new":
644 // un-approved posting was activated - admin-only notification
645 $admin_only = true;
646 $ignore_threshold = true;
647 $a_action = "approve";
648 break;
649 }
650 }
651 }
652
653 // create/update news item (only in repository)
654 if (!$a_in_wsp &&
655 in_array($a_action, array("update", "new"))) {
656 $posting->handleNews(($a_action == "update"));
657 }
658
659 // recipients
662 $blog_obj_id,
663 $a_posting_id,
664 $ignore_threshold
665 );
666 if (!sizeof($users)) {
667 return;
668 }
669
670 $ntf = new ilSystemNotification($a_in_wsp);
671 $ntf->setLangModules(array("blog"));
672 $ntf->setRefId($a_blog_node_id);
673 $ntf->setChangedByUserId($ilUser->getId());
674 $ntf->setSubjectLangId('blog_change_notification_subject');
675 $ntf->setIntroductionLangId('blog_change_notification_body_' . $a_action);
676 $ntf->addAdditionalInfo('blog_posting', $posting->getTitle());
677 if ($a_comment) {
678 $ntf->addAdditionalInfo('comment', $a_comment, true);
679 }
680 $ntf->setGotoLangId('blog_change_notification_link');
681 $ntf->setReasonLangId('blog_change_notification_reason');
682
683 $abstract = $posting->getNotificationAbstract();
684 if ($abstract) {
685 $ntf->addAdditionalInfo('content', $abstract, true);
686 }
687
688 $notified = $ntf->sendMail(
689 $users,
690 "_" . $a_posting_id,
691 ($admin_only ? "write" : "read")
692 );
693
694 // #14387
695 if (sizeof($notified)) {
696 ilNotification::updateNotificationTime(ilNotification::TYPE_BLOG, $blog_obj_id, $notified, $a_posting_id);
697 }
698 }
699
705 public static function deliverRSS($a_wsp_id)
706 {
707 global $DIC;
708
709 $tpl = $DIC["tpl"];
710 $ilSetting = $DIC->settings();
711
712 if (!$ilSetting->get('enable_global_profiles')) {
713 return;
714 }
715
716 // #10827
717 if (substr($a_wsp_id, -4) != "_cll") {
718 $wsp_id = new ilWorkspaceTree(0);
719 $obj_id = $wsp_id->lookupObjectId($a_wsp_id);
720 $is_wsp = "_wsp";
721 } else {
722 $a_wsp_id = substr($a_wsp_id, 0, -4);
723 $obj_id = ilObject::_lookupObjId($a_wsp_id);
724 $is_wsp = null;
725 }
726 if (!$obj_id) {
727 return;
728 }
729
730 $blog = new self($obj_id, false);
731 if (!$blog->hasRSS()) {
732 return;
733 }
734
735 $feed = new ilFeedWriter();
736
737 $url = ilLink::_getStaticLink($a_wsp_id, "blog", true, $is_wsp);
738 $url = str_replace("&", "&amp;", $url);
739
740 // #11870
741 $feed->setChannelTitle(str_replace("&", "&amp;", $blog->getTitle()));
742 $feed->setChannelDescription(str_replace("&", "&amp;", $blog->getDescription()));
743 $feed->setChannelLink($url);
744
745 // needed for blogpostinggui / pagegui
746 $tpl = new ilGlobalTemplate("tpl.main.html", true, true);
747
748 foreach (ilBlogPosting::getAllPostings($obj_id) as $item) {
749 $id = $item["id"];
750
751 // only published items
752 $is_active = ilBlogPosting::_lookupActive($id, "blp");
753 if (!$is_active) {
754 continue;
755 }
756
757 // #16434
758 $snippet = strip_tags(ilBlogPostingGUI::getSnippet($id), "<br><br/><div><p>");
759 $snippet = str_replace("&", "&amp;", $snippet);
760 $snippet = "<![CDATA[" . $snippet . "]]>";
761
762 $url = ilLink::_getStaticLink($a_wsp_id, "blog", true, "_" . $id . $is_wsp);
763 $url = str_replace("&", "&amp;", $url);
764
765 $feed_item = new ilFeedItem();
766 $feed_item->setTitle(str_replace("&", "&amp;", $item["title"])); // #16022
767 $feed_item->setDate($item["created"]->get(IL_CAL_DATETIME));
768 $feed_item->setDescription($snippet);
769 $feed_item->setLink($url);
770 $feed_item->setAbout($url);
771 $feed->addItem($feed_item);
772 }
773
774 $feed->showFeed();
775 exit();
776 }
777
778 public function initDefaultRoles()
779 {
781 'il_blog_contributor_' . $this->getRefId(),
782 "Contributor of blog obj_no." . $this->getId(),
783 'il_blog_contributor',
784 $this->getRefId()
785 );
786
788 'il_blog_editor_' . $this->getRefId(),
789 "Editor of blog obj_no." . $this->getId(),
790 'il_blog_editor',
791 $this->getRefId()
792 );
793
794 return array();
795 }
796
797 public function getLocalContributorRole($a_node_id)
798 {
800
801 foreach ($rbacreview->getLocalRoles($a_node_id) as $role_id) {
802 if (substr(ilObject::_lookupTitle($role_id), 0, 19) == "il_blog_contributor") {
803 return $role_id;
804 }
805 }
806 }
807
808 public function getLocalEditorRole($a_node_id)
809 {
811
812 foreach ($rbacreview->getLocalRoles($a_node_id) as $role_id) {
813 if (substr(ilObject::_lookupTitle($role_id), 0, 14) == "il_blog_editor") {
814 return $role_id;
815 }
816 }
817 }
818
819 public function getAllLocalRoles($a_node_id)
820 {
822
823 $res = array();
824 foreach ($rbacreview->getLocalRoles($a_node_id) as $role_id) {
826 }
827
828 asort($res);
829 return $res;
830 }
831
832 public function getRolesWithContributeOrRedact($a_node_id)
833 {
835
836 $contr_op_id = ilRbacReview::_getOperationIdByName("contribute");
837 $redact_op_id = ilRbacReview::_getOperationIdByName("redact");
838 $contr_role_id = $this->getLocalContributorRole($a_node_id);
839 $editor_role_id = $this->getLocalEditorRole($a_node_id);
840
841 $res = array();
842 foreach ($rbacreview->getParentRoleIds($a_node_id) as $role_id => $role) {
843 if ($role_id != $contr_role_id &&
844 $role_id != $editor_role_id) {
845 $all_ops = $rbacreview->getActiveOperationsOfRole($a_node_id, $role_id);
846 if (in_array($contr_op_id, $all_ops) ||
847 in_array($redact_op_id, $all_ops)) {
848 $res[$role_id] = ilObjRole:: _getTranslation($role["title"]);
849 }
850 }
851 }
852
853 return $res;
854 }
855
856 protected function handleQuotaUpdate()
857 {
858 }
859}
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_DATETIME
static getSnippet($a_id, $a_truncate=false, $a_truncate_length=500, $a_truncate_sign="...", $a_include_picture=false, $a_picture_width=144, $a_picture_height=144, $a_export_directory=null)
Get first text paragraph of page.
Class ilBlogPosting.
static getAllPostings($a_blog_id, $a_limit=1000, $a_offset=0)
Get all postings of blog.
static deleteAllBlogPostings($a_blog_id)
Delete all postings for blog.
A FeedItem represents an item in a News Feed.
Feed writer class.
special template class to simplify handling of ITX/PEAR
static commentsActivated($a_rep_obj_id, $a_obj_id, $a_obj_type, $a_news_id=0)
Are comments activated for object?
static activateComments($a_rep_obj_id, $a_obj_id, $a_obj_type, $a_activate=true)
Activate notes feature.
static removeForObject($type, $id)
Remove all notifications for given object.
static getNotificationsForObject($type, $id, $page_id=null, $ignore_threshold=false)
Get all users for given object.
static updateNotificationTime($type, $id, array $user_ids, $page_id=false)
Update the last mail timestamp for given object and users.
Class ilObjBlog.
setBackgroundColor($a_value)
Set background color.
getRolesWithContributeOrRedact($a_node_id)
setProfilePicture($a_status)
Toggle profile picture status.
setNavModeListMonthsWithPostings($a_value)
setFontColor($a_value)
Set font color.
hasProfilePicture()
Get profile picture status.
setAuthors($a_value)
setNotesStatus($a_status)
Toggle notes status.
getStyleSheetId()
Get style sheet id.
static sendNotification($a_action, $a_in_wsp, $a_blog_node_id, $a_posting_id, $a_comment=null)
getLocalContributorRole($a_node_id)
static deliverRSS($a_wsp_id)
Deliver blog as rss feed.
deleteImage()
remove existing file
setAbstractShorten($a_value)
const NAV_MODE_MONTH
setKeywords($a_value)
getFontColor()
Get font color.
getImageFullPath($a_as_thumb=false)
Get banner image incl.
setAbstractShortenLength($a_value)
setRSS($a_status)
Toggle RSS status.
const NAV_MODE_LIST
initDefaultRoles()
init default roles settings Purpose of this function is to create a local role folder and local roles...
setAbstractImage($a_value)
setOrder(array $a_values=null)
setOverviewPostings($a_value)
uploadImage(array $a_upload)
Upload new image file.
setAbstractImageHeight($a_value)
static initStorage($a_id, $a_subdir=null)
Init file system storage.
getLocalEditorRole($a_node_id)
getBackgroundColor()
Get background color.
getAbstractShortenLength()
setNavMode($a_value)
const ABSTRACT_DEFAULT_SHORTEN_LENGTH
getAllLocalRoles($a_node_id)
const ABSTRACT_DEFAULT_IMAGE_WIDTH
const NAV_MODE_LIST_DEFAULT_POSTINGS
doCloneObject($new_obj, $a_target_id, $a_copy_id=null, $a_omit_tree=false)
setStyleSheetId($a_style)
Set style sheet id.
setAbstractImageWidth($a_value)
setNavModeListMonths($a_value)
hasApproval()
Get approval status.
setApproval($a_status)
Toggle approval status.
hasRSS()
Get RSS status.
getImage()
Get banner image.
getNavModeListMonthsWithPostings()
getNotesStatus()
Get notes status.
__construct($a_id=0, $a_reference=true)
Constructor.
const ABSTRACT_DEFAULT_IMAGE_HEIGHT
setImage($a_value)
Set banner image.
static _getTranslation($a_role_title)
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)
static _lookupStandard($a_id)
Lookup standard flag.
static lookupObjectStyle($a_obj_id)
Lookup object style.
static writeStyleUsage($a_obj_id, $a_style_id)
Write style usage.
Class ilObject2 This is an intermediate progress of ilObject class.
getRefId()
get reference id @access public
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
getId()
get object id @access public
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
static _getOperationIdByName($a_operation)
get operation id by name of operation @access public @access static
ILIAS Setting Class.
Wrapper classes for system notifications.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static escapeShellArg($a_arg)
static execConvert($args)
execute convert command
Access handler for personal workspace.
Tree handler for personal workspace.
global $DIC
Definition: goto.php:24
$ilUser
Definition: imgupload.php:18
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
exit
Definition: login.php:29
$source
Definition: metadata.php:76
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $ilSetting
Definition: privfeed.php:17
$url
foreach($_POST as $key=> $value) $res
global $ilDB