ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilPortfolioTemplatePage.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Modules/Portfolio/classes/class.ilPortfolioPage.php");
5
15{
17
23 function getParentType()
24 {
25 return "prtt";
26 }
27
28 public function getPageDiskSize()
29 {
30 $quota_sum = 0;
31
32 $this->buildDom();
33 $dom = $this->getDom();
34 if($dom instanceof php4DOMDocument)
35 {
36 $dom = $dom->myDOMDocument;
37 }
38 $xpath_temp = new DOMXPath($dom);
39
40 // mobs
41 include_once "Services/MediaObjects/classes/class.ilObjMediaObject.php";
42 $nodes = $xpath_temp->query("//PageContent/MediaObject/MediaAlias");
43 foreach($nodes as $node)
44 {
45 $mob_id = array_pop(explode("_", $node->getAttribute("OriginId")));
46 $mob_dir = ilObjMediaObject::_getDirectory($mob_id);
47 $quota_sum += ilUtil::dirSize($mob_dir);
48 }
49
50 return $quota_sum;
51 }
52}
53
54?>
_getDirectory($a_mob_id)
get directory for files of media object (static)
buildDom($a_force=false)
getDom()
Deprecated php4DomDocument.
Page for user portfolio.
Page for portfolio template.