ILIAS  release_8 Revision v8.24
class.ilPortfolioPageAction.php
Go to the documentation of this file.
1<?php
2
24{
25 protected ilObjUser $actor;
26
27 public function __construct(ilObjUser $actor = null)
28 {
29 global $DIC;
30 if (is_null($actor)) {
31 $actor = $DIC->user();
32 }
33 $this->actor = $actor;
34 }
35
39 public function deletePagesOfBlog(int $a_blog_id): void
40 {
41 $pages = ilPortfolioPage::getPagesForBlog($a_blog_id);
42 foreach ($pages as $page) {
43 if (ilObject::_lookupOwner($page->getPortfolioId()) === $this->actor->getId()) {
44 $page->delete();
45 }
46 }
47 }
48}
User class.
static _lookupOwner(int $obj_id)
Lookup owner user ID for object ID.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
deletePagesOfBlog(int $a_blog_id)
Delete pages of blog.
__construct(ilObjUser $actor=null)
static getPagesForBlog(int $a_blog_id)
Get portfolio pages for blog.
global $DIC
Definition: feed.php:28