ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjPortfolioBase Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilObjPortfolioBase:
+ Collaboration diagram for ilObjPortfolioBase:

Public Member Functions

 __construct (int $a_id=0, bool $a_reference=true)
 
 setOnline (bool $a_value)
 
 isOnline ()
 
 setPublicComments (bool $a_value)
 
 hasPublicComments ()
 
 hasProfilePicture ()
 
 setProfilePicture (bool $a_status)
 
 getBackgroundColor ()
 
 setBackgroundColor (string $a_value)
 Set background color, e.g. More...
 
 getFontColor ()
 
 setFontColor (string $a_value)
 
 fixLinksOnTitleChange (array $a_title_changes)
 Update internal portfolio links on title change. More...
 
- Public Member Functions inherited from ilObject2
 __construct (int $a_id=0, bool $a_reference=true)
 Constructor. More...
 
 read ()
 
 create (bool $a_clone_mode=false)
 
 update ()
 
 delete ()
 
 cloneMetaData (ilObject $target_obj)
 
 cloneObject (int $target_id, int $copy_id=0, bool $omit_tree=false)
 
- Public Member Functions inherited from ilObject
 getObjectProperties ()
 
 flushObjectProperties ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 processAutoRating ()
 
 read ()
 
 getId ()
 
 setId (int $id)
 
 setRefId (int $ref_id)
 
 getRefId ()
 
 getType ()
 
 setType (string $type)
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 
 getUntranslatedTitle ()
 Get untranslated object title WebDAV needs to access the untranslated title of an object. More...
 
 setTitle (string $title)
 
 getDescription ()
 
 setDescription (string $description)
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 
 setImportId (string $import_id)
 
 setOfflineStatus (bool $status)
 
 getOfflineStatus ()
 
 supportsOfflineHandling ()
 
 getOwner ()
 
 getOwnerName ()
 get full name of object owner More...
 
 setOwner (int $usr_id)
 
 getCreateDate ()
 Get create date in YYYY-MM-DD HH-MM-SS format. More...
 
 getLastUpdateDate ()
 Get last update date in YYYY-MM-DD HH-MM-SS format. More...
 
 create ()
 note: title, description and type should be set when this function is called More...
 
 update ()
 
 MDUpdateListener (string $element)
 Metadata update listener. More...
 
 createMetaData ()
 
 updateMetaData ()
 
 deleteMetaData ()
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree (int $parent_ref_id)
 maybe this method should be in tree object!? More...
 
 setPermissions (int $parent_ref_id)
 
 setParentRolePermissions (int $parent_ref_id)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type. More...
 
 applyDidacticTemplate (int $tpl_id)
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo (int $target_id, int $copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies. More...
 
 cloneMetaData (ilObject $target_obj)
 Copy meta data. More...
 
 selfOrParentWithRatingEnabled ()
 
 getPossibleSubObjects (bool $filter=true)
 get all possible sub objects of this type the object can decide which types of sub objects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static lookupOnline (int $a_id)
 
static clonePagesAndSettings (ilObjPortfolioBase $a_source, ilObjPortfolioBase $a_target, ?array $a_recipe=null, bool $copy_all=false)
 Build template from portfolio and vice versa. More...
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId (string $import_id)
 Get (latest) object id for an import id. More...
 
static _lookupImportId (int $obj_id)
 
static _lookupOwnerName (int $owner_id)
 Lookup owner name for owner id. More...
 
static _getIdForImportId (string $import_id)
 
static _getAllReferences (int $id)
 get all reference ids for object ID More...
 
static _lookupTitle (int $obj_id)
 
static lookupOfflineStatus (int $obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner (int $obj_id)
 Lookup owner user ID for object ID. More...
 
static _getIdsForTitle (string $title, string $type='', bool $partial_match=false)
 
static _lookupDescription (int $obj_id)
 
static _lookupLastUpdate (int $obj_id, bool $formatted=false)
 
static _getLastUpdateOfObjects (array $obj_ids)
 
static _lookupObjId (int $ref_id)
 
static _setDeletedDate (int $ref_id, int $deleted_by)
 
static setDeletedDates (array $ref_ids, int $user_id)
 
static _resetDeletedDate (int $ref_id)
 
static _lookupDeletedDate (int $ref_id)
 
static _writeTitle (int $obj_id, string $title)
 write title to db (static) More...
 
static _writeDescription (int $obj_id, string $desc)
 write description to db (static) More...
 
static _writeImportId (int $obj_id, string $import_id)
 write import id to db (static) More...
 
static _lookupType (int $id, bool $reference=false)
 
static _isInTrash (int $ref_id)
 
static _hasUntrashedReference (int $obj_id)
 checks whether an object has at least one reference that is not in trash More...
 
static _lookupObjectId (int $ref_id)
 
static _getObjectsDataForType (string $type, bool $omit_trash=false)
 get all objects of a certain type More...
 
static _exists (int $id, bool $reference=false, ?string $type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType (string $obj_type="", ?int $owner=null)
 
static _prepareCloneSelection (array $ref_ids, string $new_type, bool $show_path=true)
 Prepare copy wizard object selection. More...
 
static getIconForType (string $type)
 
static _getIcon (int $obj_id=0, string $size="big", string $type="", bool $offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (array &$deps, int $ref_id, int $obj_id, string $type, int $depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies (int $obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $obj_ids)
 
static getAllOwnedRepositoryObjects (int $user_id)
 
static fixMissingTitles ($type, array &$obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate (int $obj_id)
 
static _getObjectTypeIdByTitle (string $type, ?\ilDBInterface $ilDB=null)
 

Protected Member Functions

 doRead ()
 
 doReadCustom (array $a_row)
 May be overwritten by derived classes. More...
 
 doCreate (bool $clone_mode=false)
 
 doUpdate ()
 
 doUpdateCustom (array &$a_fields)
 May be overwritte by derived classes. More...
 
 doDelete ()
 
 deleteAllPages ()
 
- Protected Member Functions inherited from ilObject2
 initType ()
 
 doRead ()
 
 doCreate (bool $clone_mode=false)
 
 beforeCreate ()
 If overwritten this method should return true, there is currently no "abort" handling for cases where "false" is returned. More...
 
 doUpdate ()
 
 beforeUpdate ()
 
 doDelete ()
 
 beforeDelete ()
 
 doCloneObject (ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id=null)
 
 beforeCloneObject ()
 
- Protected Member Functions inherited from ilObject
 doMDUpdateListener (string $a_element)
 
 beforeMDUpdateListener (string $a_element)
 
 doCreateMetaData ()
 
 beforeCreateMetaData ()
 
 doUpdateMetaData ()
 
 beforeUpdateMetaData ()
 
 doDeleteMetaData ()
 
 beforeDeleteMetaData ()
 
 handleAutoRating ()
 
 hasAutoRating ()
 

Static Protected Member Functions

static cloneBasics (ilObjPortfolioBase $a_source, ilObjPortfolioBase $a_target)
 Clone basic settings. More...
 
static updateDomNodes (DOMDocument $a_dom, string $a_xpath, string $a_attr_id, string $a_attr_value)
 

Protected Attributes

ILIAS Notes Service $notes
 
ilSetting $setting
 
bool $online = false
 
bool $comments = false
 
string $bg_color = ""
 
string $font_color = ""
 
string $img = ""
 
string $ppic = ""
 
bool $style = false
 
- Protected Attributes inherited from ilObject
ilLogger $obj_log
 
ILIAS $ilias
 
ilObjectDefinition $obj_definition
 
ilDBInterface $db
 
ilLogger $log
 
ilErrorHandling $error
 
ilTree $tree
 
ilAppEventHandler $app_event_handler
 
ilRbacAdmin $rbac_admin
 
ilRbacReview $rbac_review
 
ilObjUser $user
 
ilLanguage $lng
 
LOMServices $lom_services
 
bool $call_by_reference
 
int $max_title = self::TITLE_LENGTH
 
int $max_desc = self::DESC_LENGTH
 
bool $add_dots = true
 
int $ref_id = null
 
string $type = ""
 
string $title = ""
 
string $desc = ""
 
string $long_desc = ""
 
int $owner = 0
 
string $create_date = ""
 
string $last_update = ""
 
string $import_id = ""
 
bool $register = false
 

Additional Inherited Members

- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 
const DESC_LENGTH = 128
 
const LONG_DESC_LENGTH = 4000
 
const TABLE_OBJECT_DATA = "object_data"
 
array $objectList
 
string $untranslatedTitle
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Portfolio base

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 24 of file class.ilObjPortfolioBase.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjPortfolioBase::__construct ( int  $a_id = 0,
bool  $a_reference = true 
)

Definition at line 36 of file class.ilObjPortfolioBase.php.

References $DIC, and ILIAS\GlobalScreen\Provider\__construct().

39  {
40  global $DIC;
41 
42  $this->notes = $DIC->notes();
43 
44  parent::__construct($a_id, $a_reference);
45 
46  $this->setting = $DIC->settings();
47 
48  $this->db = $DIC->database();
49  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ cloneBasics()

static ilObjPortfolioBase::cloneBasics ( ilObjPortfolioBase  $a_source,
ilObjPortfolioBase  $a_target 
)
staticprotected

Clone basic settings.

Parameters
ilObjPortfolioBase$a_source
ilObjPortfolioBase$a_target

Definition at line 219 of file class.ilObjPortfolioBase.php.

References $DIC, ilContainer\_getContainerSettings(), ilContainer\_writeContainerSetting(), getBackgroundColor(), getFontColor(), ilObject\getId(), hasProfilePicture(), hasPublicComments(), setBackgroundColor(), setFontColor(), setProfilePicture(), setPublicComments(), and ilObject2\update().

222  : void {
223  global $DIC;
224 
225  // copy portfolio properties
226  $a_target->setPublicComments($a_source->hasPublicComments());
227  $a_target->setProfilePicture($a_source->hasProfilePicture());
228  $a_target->setFontColor($a_source->getFontColor());
229  $a_target->setBackgroundColor($a_source->getBackgroundColor());
230  $a_target->update();
231 
232  // container settings
233  foreach (ilContainer::_getContainerSettings($a_source->getId()) as $keyword => $value) {
234  ilContainer::_writeContainerSetting($a_target->getId(), $keyword, $value);
235  }
236 
237  // style
238  $content_style_domain = $DIC
239  ->contentStyle()
240  ->domain()
241  ->styleForObjId($a_source->getId());
242  $content_style_domain->cloneTo($a_target->getId());
243  }
setProfilePicture(bool $a_status)
setBackgroundColor(string $a_value)
Set background color, e.g.
global $DIC
Definition: shib_login.php:22
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
static _getContainerSettings(int $a_id)
+ Here is the call graph for this function:

◆ clonePagesAndSettings()

static ilObjPortfolioBase::clonePagesAndSettings ( ilObjPortfolioBase  $a_source,
ilObjPortfolioBase  $a_target,
?array  $a_recipe = null,
bool  $copy_all = false 
)
static

Build template from portfolio and vice versa.

Definition at line 248 of file class.ilObjPortfolioBase.php.

References $DIC, ilObject\$lng, $valid, ilCopyWizardOptions\_allocateCopyId(), ilAdvancedMDValues\_cloneValues(), ilAdvancedMDRecord\_getSelectedRecordsByObject(), ilObject\_lookupType(), ilPortfolioPage\getAllPortfolioPages(), ilObject\getId(), ilAdvancedMDRecord\getObjRecSelection(), null, ilAdvancedMDRecord\saveObjRecSelection(), ilPortfolioPage\TYPE_PAGE, and ilPortfolioPage\updateInternalLinks().

Referenced by ILIAS\Portfolio\Administration\PortfolioRoleAssignmentManager\assignPortfoliosOnLogin(), ilObjPortfolioGUI\createFromTemplateDirect(), ilObjPortfolioGUI\createPortfolioFromAssignment(), ilObjPortfolioGUI\createPortfolioFromTemplateProcess(), and ilObjPortfolioTemplateGUI\initDidacticTemplate().

253  : void {
254  global $DIC;
255 
256  $lng = $DIC->language();
257  $ilUser = $DIC->user();
258  $skill_personal_service = $DIC->skills()->personal();
259 
260  $source_id = $a_source->getId();
261  $target_id = $a_target->getId();
262 
263  if ($a_source instanceof ilObjPortfolioTemplate &&
264  $a_target instanceof ilObjPortfolio) {
265  $direction = "t2p";
266  } elseif ($a_source instanceof ilObjPortfolio &&
267  $a_target instanceof ilObjPortfolioTemplate) {
268  $direction = "p2t";
269  } else {
270  return;
271  }
272 
273  self::cloneBasics($a_source, $a_target);
274 
275  // copy advanced metadata
277  ilAdvancedMDValues::_cloneValues($copy_id, $a_source->getId(), $a_target->getId());
278 
279  // copy selection of global optional sets
281  $a_target->getId(),
282  'pfpg',
283  ilAdvancedMDRecord::getObjRecSelection($a_source->getId(), 'pfpg')
284  );
285 
286  // fix metadata record type assignment
287  // e.g. if portfolio is created from template
288  // we need to change this from prtt to prtf
290  ilObject::_lookupType($a_source->getId()),
291  $a_target->getId(),
292  "pfpg",
293  false
294  ) as $rec) {
295  /*
296  * BT 35494: reset assignement of the newly cloned local records,
297  * and only append what's needed to global ones
298  */
299  $target_type = ilObject::_lookupType($a_target->getId());
300  if ($rec->getParentObject() == $a_target->getId()) {
301  $rec->setAssignedObjectTypes(
302  [[
303  "obj_type" => $target_type,
304  "sub_type" => "pfpg",
305  "optional" => 0
306  ]
307  ]
308  );
309  } elseif (!$rec->isAssignedObjectType($target_type, 'pfpg')) {
310  $rec->appendAssignedObjectType(
311  $target_type,
312  "pfpg"
313  );
314  }
315  $rec->update();
316  }
317 
318  // personal skills
319  $pskills = array_keys($skill_personal_service->getSelectedUserSkills($ilUser->getId()));
320 
321  // copy pages
322  $page_map = array();
323  foreach (ilPortfolioPage::getAllPortfolioPages($source_id) as $page) {
324  $page_id = $page["id"];
325 
326  if ($direction === "t2p") {
327  $source_page = new ilPortfolioTemplatePage($page_id);
328  $target_page = new ilPortfolioPage();
329  } else {
330  $source_page = new ilPortfolioPage($page_id);
331  $target_page = new ilPortfolioTemplatePage();
332  }
333  $source_page->setPortfolioId($source_id);
334  $target_page->setPortfolioId($target_id);
335 
336  $page_type = $source_page->getType();
337  $page_title = $source_page->getTitle();
338 
339 
340 
341 
342  $page_recipe = null;
343  if (isset($a_recipe)) {
344  $page_recipe = $a_recipe[$page_id] ?? null;
345  }
346 
347  $valid = false;
348  switch ($page_type) {
349  // page editor
350  default:
351  $target_page->setXMLContent(
352  $source_page->copyXmlContent(
353  true,
354  $a_target->getId(),
355  $copy_id
356  )
357  );
358  $target_page->buildDom(true);
359 
360  // parse content / blocks
361 
362  if ($direction === "t2p") {
363  $dom = $target_page->getDomDoc();
364 
365  // update profile/consultation hours user id
366  self::updateDomNodes($dom, "//PageContent/Profile", "User", $ilUser->getId());
367  self::updateDomNodes($dom, "//PageContent/ConsultationHours", "User", $ilUser->getId());
368  self::updateDomNodes($dom, "//PageContent/MyCourses", "User", $ilUser->getId());
369 
370  // skills
371  $xpath = new DOMXPath($dom);
372  $nodes = $xpath->query("//PageContent/Skills");
373  foreach ($nodes as $node) {
374  $skill_id = $node->getAttribute("Id");
375 
376  // existing personal skills
377  if (in_array($skill_id, $pskills)) {
378  $node->setAttribute("User", $ilUser->getId());
379  }
380  // new skill
381  elseif ($copy_all || in_array($skill_id, $a_recipe["skills"])) {
382  $skill_personal_service->addPersonalSkill($ilUser->getId(), $skill_id);
383 
384  $node->setAttribute("User", $ilUser->getId());
385  }
386  // remove skill
387  else {
388  $page_element = $node->parentNode;
389  $page_element->parentNode->removeChild($page_element);
390  }
391  }
392  }
393 
394  $valid = true;
395  break;
396  }
397 
398  if ($valid) {
399  // #12038 - update xml from dom
400  $target_page->setXMLContent($target_page->getXMLFromDom());
401 
402  $target_page->setType($page_type);
403  $target_page->setTitle($page_title);
404  $target_page->create(false);
405 
406  if ($page_type === ilPortfolioPage::TYPE_PAGE) {
407  $target_page->update(); // handle mob usages!
408  }
409  $page_map[$source_page->getId()] = $target_page->getId();
410  }
411  }
412  ilPortfolioPage::updateInternalLinks($page_map, $a_target);
413  }
static getAllPortfolioPages(int $a_portfolio_id)
Get pages of portfolio.
$valid
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getSelectedRecordsByObject(string $a_obj_type, int $a_id, string $a_sub_type="", bool $is_ref_id=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static getObjRecSelection(int $a_obj_id, string $a_sub_type="")
Get repository object record selection.
ilLanguage $lng
static updateInternalLinks(array $a_copied_nodes, ilObjPortfolioBase $a_target_obj)
Update internal links, after multiple pages have been copied.
global $DIC
Definition: shib_login.php:22
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...
static _allocateCopyId()
Allocate a copy for further entries.
static saveObjRecSelection(int $a_obj_id, string $a_sub_type="", ?array $a_records=null, bool $a_delete_before=true)
Save repository object record selection.
static _cloneValues(int $copy_id, int $a_source_id, int $a_target_id, ?string $a_sub_type=null, ?int $a_source_sub_id=null, ?int $a_target_sub_id=null)
Clone Advanced Meta Data.
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteAllPages()

ilObjPortfolioBase::deleteAllPages ( )
abstractprotected

Referenced by doDelete().

+ Here is the caller graph for this function:

◆ doCreate()

ilObjPortfolioBase::doCreate ( bool  $clone_mode = false)
protected

Definition at line 158 of file class.ilObjPortfolioBase.php.

References ilObject\$db, and $ilDB.

158  : void
159  {
160  $ilDB = $this->db;
161 
162  $ilDB->manipulate("INSERT INTO usr_portfolio (id,is_online)" .
163  " VALUES (" . $ilDB->quote($this->id, "integer") . "," .
164  $ilDB->quote(0, "integer") . ")");
165  }
ilDBInterface $db

◆ doDelete()

ilObjPortfolioBase::doDelete ( )
protected

Definition at line 196 of file class.ilObjPortfolioBase.php.

References ilObject\$db, $ilDB, and deleteAllPages().

196  : void
197  {
198  $ilDB = $this->db;
199 
200  $this->deleteAllPages();
201 
202  $ilDB->manipulate("DELETE FROM usr_portfolio" .
203  " WHERE id = " . $ilDB->quote($this->id, "integer"));
204  }
ilDBInterface $db
+ Here is the call graph for this function:

◆ doRead()

ilObjPortfolioBase::doRead ( )
protected

Definition at line 132 of file class.ilObjPortfolioBase.php.

References ilObject\$db, $ilDB, doReadCustom(), setBackgroundColor(), setFontColor(), setOnline(), setProfilePicture(), and setPublicComments().

132  : void
133  {
134  $ilDB = $this->db;
135 
136  $set = $ilDB->query("SELECT * FROM usr_portfolio" .
137  " WHERE id = " . $ilDB->quote($this->id, "integer"));
138  $row = $ilDB->fetchAssoc($set);
139 
140  $this->setOnline((bool) $row["is_online"]);
141  $this->setProfilePicture((bool) $row["ppic"]);
142  $this->setBackgroundColor((string) $row["bg_color"]);
143  $this->setFontColor((string) $row["font_color"]);
144 
145  // #14661
146  $this->setPublicComments($this->notes->domain()->commentsActive($this->id));
147 
148  $this->doReadCustom($row);
149  }
setProfilePicture(bool $a_status)
setBackgroundColor(string $a_value)
Set background color, e.g.
ilDBInterface $db
doReadCustom(array $a_row)
May be overwritten by derived classes.
+ Here is the call graph for this function:

◆ doReadCustom()

ilObjPortfolioBase::doReadCustom ( array  $a_row)
protected

May be overwritten by derived classes.

Definition at line 154 of file class.ilObjPortfolioBase.php.

Referenced by doRead().

154  : void
155  {
156  }
+ Here is the caller graph for this function:

◆ doUpdate()

ilObjPortfolioBase::doUpdate ( )
protected

Definition at line 167 of file class.ilObjPortfolioBase.php.

References ilObject\$db, $ilDB, doUpdateCustom(), getBackgroundColor(), getFontColor(), hasProfilePicture(), hasPublicComments(), and isOnline().

167  : void
168  {
169  $ilDB = $this->db;
170 
171  $fields = array(
172  "is_online" => array("integer", $this->isOnline()),
173  "ppic" => array("integer", $this->hasProfilePicture()),
174  "bg_color" => array("text", $this->getBackgroundColor()),
175  "font_color" => array("text", $this->getFontColor())
176  );
177  $this->doUpdateCustom($fields);
178 
179  // #14661
180  $this->notes->domain()->activateComments($this->id, $this->hasPublicComments());
181 
182  $ilDB->update(
183  "usr_portfolio",
184  $fields,
185  array("id" => array("integer", $this->id))
186  );
187  }
ilDBInterface $db
doUpdateCustom(array &$a_fields)
May be overwritte by derived classes.
+ Here is the call graph for this function:

◆ doUpdateCustom()

ilObjPortfolioBase::doUpdateCustom ( array &  $a_fields)
protected

May be overwritte by derived classes.

Definition at line 192 of file class.ilObjPortfolioBase.php.

Referenced by doUpdate().

192  : void
193  {
194  }
+ Here is the caller graph for this function:

◆ fixLinksOnTitleChange()

ilObjPortfolioBase::fixLinksOnTitleChange ( array  $a_title_changes)

Update internal portfolio links on title change.

Definition at line 431 of file class.ilObjPortfolioBase.php.

References ilPortfolioPage\getAllPortfolioPages(), ilObject\getId(), and ilObject\getType().

431  : void
432  {
433  foreach (ilPortfolioPage::getAllPortfolioPages($this->getId()) as $port_page) {
434  if ($this->getType() === "prtt") {
435  $page = new ilPortfolioTemplatePage($port_page["id"]);
436  } else {
437  $page = new ilPortfolioPage($port_page["id"]);
438  }
439  if ($page->renameLinksOnTitleChange($a_title_changes)) {
440  $page->update(true, true);
441  }
442  }
443  }
static getAllPortfolioPages(int $a_portfolio_id)
Get pages of portfolio.
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...
+ Here is the call graph for this function:

◆ getBackgroundColor()

ilObjPortfolioBase::getBackgroundColor ( )

Definition at line 99 of file class.ilObjPortfolioBase.php.

References $bg_color.

Referenced by cloneBasics(), and doUpdate().

99  : string
100  {
101  if (!$this->bg_color) {
102  $this->bg_color = "ffffff";
103  }
104  return $this->bg_color;
105  }
+ Here is the caller graph for this function:

◆ getFontColor()

ilObjPortfolioBase::getFontColor ( )

Definition at line 115 of file class.ilObjPortfolioBase.php.

References $font_color.

Referenced by cloneBasics(), and doUpdate().

115  : string
116  {
117  if (!$this->font_color) {
118  $this->font_color = "505050";
119  }
120  return $this->font_color;
121  }
+ Here is the caller graph for this function:

◆ hasProfilePicture()

ilObjPortfolioBase::hasProfilePicture ( )

Definition at line 89 of file class.ilObjPortfolioBase.php.

References $ppic.

Referenced by cloneBasics(), doUpdate(), and ilObjPortfolioBaseGUI\renderFullscreenHeader().

89  : bool
90  {
91  return $this->ppic;
92  }
+ Here is the caller graph for this function:

◆ hasPublicComments()

ilObjPortfolioBase::hasPublicComments ( )

Definition at line 84 of file class.ilObjPortfolioBase.php.

References $comments.

Referenced by cloneBasics(), and doUpdate().

84  : bool
85  {
86  return $this->comments;
87  }
+ Here is the caller graph for this function:

◆ isOnline()

ilObjPortfolioBase::isOnline ( )

Definition at line 61 of file class.ilObjPortfolioBase.php.

References $online.

Referenced by ilObjPortfolioTemplate\doCloneObject(), and doUpdate().

61  : bool
62  {
63  return $this->online;
64  }
+ Here is the caller graph for this function:

◆ lookupOnline()

static ilObjPortfolioBase::lookupOnline ( int  $a_id)
static

Definition at line 66 of file class.ilObjPortfolioBase.php.

References $DIC, and $ilDB.

66  : bool
67  {
68  global $DIC;
69 
70  $ilDB = $DIC->database();
71 
72  $set = $ilDB->query("SELECT is_online" .
73  " FROM usr_portfolio" .
74  " WHERE id = " . $ilDB->quote($a_id, "integer"));
75  $row = $ilDB->fetchAssoc($set);
76  return (bool) $row["is_online"];
77  }
global $DIC
Definition: shib_login.php:22

◆ setBackgroundColor()

ilObjPortfolioBase::setBackgroundColor ( string  $a_value)

Set background color, e.g.

"efefef"

Definition at line 110 of file class.ilObjPortfolioBase.php.

Referenced by cloneBasics(), and doRead().

110  : void
111  {
112  $this->bg_color = $a_value;
113  }
+ Here is the caller graph for this function:

◆ setFontColor()

ilObjPortfolioBase::setFontColor ( string  $a_value)

Definition at line 123 of file class.ilObjPortfolioBase.php.

Referenced by cloneBasics(), and doRead().

123  : void
124  {
125  $this->font_color = $a_value;
126  }
+ Here is the caller graph for this function:

◆ setOnline()

ilObjPortfolioBase::setOnline ( bool  $a_value)

Definition at line 56 of file class.ilObjPortfolioBase.php.

Referenced by doRead().

56  : void
57  {
58  $this->online = $a_value;
59  }
+ Here is the caller graph for this function:

◆ setProfilePicture()

ilObjPortfolioBase::setProfilePicture ( bool  $a_status)

Definition at line 94 of file class.ilObjPortfolioBase.php.

Referenced by cloneBasics(), and doRead().

94  : void
95  {
96  $this->ppic = $a_status;
97  }
+ Here is the caller graph for this function:

◆ setPublicComments()

ilObjPortfolioBase::setPublicComments ( bool  $a_value)

Definition at line 79 of file class.ilObjPortfolioBase.php.

Referenced by cloneBasics(), and doRead().

79  : void
80  {
81  $this->comments = $a_value;
82  }
+ Here is the caller graph for this function:

◆ updateDomNodes()

static ilObjPortfolioBase::updateDomNodes ( DOMDocument  $a_dom,
string  $a_xpath,
string  $a_attr_id,
string  $a_attr_value 
)
staticprotected

Definition at line 415 of file class.ilObjPortfolioBase.php.

420  : void {
421  $xpath_temp = new DOMXPath($a_dom);
422  $nodes = $xpath_temp->query($a_xpath);
423  foreach ($nodes as $node) {
424  $node->setAttribute($a_attr_id, $a_attr_value);
425  }
426  }

Field Documentation

◆ $bg_color

string ilObjPortfolioBase::$bg_color = ""
protected

Definition at line 30 of file class.ilObjPortfolioBase.php.

Referenced by getBackgroundColor().

◆ $comments

bool ilObjPortfolioBase::$comments = false
protected

Definition at line 29 of file class.ilObjPortfolioBase.php.

Referenced by hasPublicComments().

◆ $font_color

string ilObjPortfolioBase::$font_color = ""
protected

Definition at line 31 of file class.ilObjPortfolioBase.php.

Referenced by getFontColor().

◆ $img

string ilObjPortfolioBase::$img = ""
protected

Definition at line 32 of file class.ilObjPortfolioBase.php.

◆ $notes

ILIAS Notes Service ilObjPortfolioBase::$notes
protected

Definition at line 26 of file class.ilObjPortfolioBase.php.

◆ $online

bool ilObjPortfolioBase::$online = false
protected

Definition at line 28 of file class.ilObjPortfolioBase.php.

Referenced by isOnline().

◆ $ppic

string ilObjPortfolioBase::$ppic = ""
protected

Definition at line 33 of file class.ilObjPortfolioBase.php.

Referenced by hasProfilePicture().

◆ $setting

ilSetting ilObjPortfolioBase::$setting
protected

◆ $style

bool ilObjPortfolioBase::$style = false
protected

Definition at line 34 of file class.ilObjPortfolioBase.php.


The documentation for this class was generated from the following file: