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