ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilPortfolioTemplatePage.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
11{
13
19 public function getParentType()
20 {
21 return "prtt";
22 }
23
24 public function getPageDiskSize()
25 {
26 $quota_sum = 0;
27
28 $this->buildDom();
29 $dom = $this->getDom();
30 if ($dom instanceof php4DOMDocument) {
31 $dom = $dom->myDOMDocument;
32 }
33 $xpath_temp = new DOMXPath($dom);
34
35 // mobs
36 $nodes = $xpath_temp->query("//PageContent/MediaObject/MediaAlias");
37 foreach ($nodes as $node) {
38 $mob_id = array_pop(explode("_", $node->getAttribute("OriginId")));
39 $mob_dir = ilObjMediaObject::_getDirectory($mob_id);
40 $quota_sum += ilUtil::dirSize($mob_dir);
41 }
42
43 return $quota_sum;
44 }
45}
An exception for terminatinating execution or to throw for unit testing.
static _getDirectory($a_mob_id)
Get absolute directory.
buildDom($a_force=false)
getDom()
Deprecated php4DomDocument.
Page for user portfolio.
Page for portfolio template.