ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilPortfolioPageAction.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
4
12{
16 protected $actor;
17
21 public function __construct(ilObjUser $actor = null)
22 {
23 global $DIC;
24 if (is_null($actor)) {
25 $actor = $DIC->user();
26 }
27 $this->actor = $actor;
28 }
29
35 public function deletePagesOfBlog($a_blog_id)
36 {
37 $pages = ilPortfolioPage::getPagesForBlog($a_blog_id);
38 foreach ($pages as $page) {
39 if (ilObject::_lookupOwner($page->getPortfolioId()) == $this->actor->getId()) {
40 $page->delete();
41 }
42 }
43 }
44}
An exception for terminatinating execution or to throw for unit testing.
static _lookupOwner($a_id)
lookup object owner
Actions on portfolio pages.
deletePagesOfBlog($a_blog_id)
Delete pages of blog.
__construct(ilObjUser $actor=null)
Constructor.
static getPagesForBlog($a_blog_id)
Get portfolio pages for blog.
global $DIC
Definition: saml.php:7