ILIAS  release_8 Revision v8.24
class.ObjectFacade.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22
25use ilObject;
26
32{
34 protected int $ref_id;
35 protected int $obj_id;
38
39 public function __construct(
42 int $ref_id,
43 int $obj_id = 0
44 ) {
45 $this->ref_id = $ref_id;
46 $this->obj_id = ($obj_id > 0)
47 ? $obj_id
49 $this->domain_service = $domain_service;
50 $this->object_manager = $domain_service->object($this->ref_id, $obj_id);
51 }
52
57 public function cloneTo(int $obj_id): void
58 {
59 $this->object_manager->cloneTo($obj_id);
60 }
61
66 public function getEffectiveStyleId(): int
67 {
68 return $this->object_manager->getEffectiveStyleId();
69 }
70
77 public function getStyleId(): int
78 {
79 return $this->object_manager->getStyleId();
80 }
81
87 public function updateStyleId(int $style_id): void
88 {
89 $this->object_manager->updateStyleId($style_id);
90 }
91
95 public function inheritFromParent(): void
96 {
97 $this->object_manager->inheritFromParent();
98 }
99}
object(int $ref_id, int $obj_id=0)
Objects without ref id (e.g.
External facade for object content styles.
inheritFromParent()
Inherits a non local style from the parent container.
getEffectiveStyleId()
This ID must be used when rendering the object (pages).
cloneTo(int $obj_id)
This must be called on cloning the parent object, with passing the object id of the clone.
__construct(InternalDataService $data_service, InternalDomainService $domain_service, int $ref_id, int $obj_id=0)
getStyleId()
Get the style ID currently set (stored) by the object.
updateStyleId(int $style_id)
Calling this should usually be avoided, currently this is necessary on import routines,...
Manages repository object related content style behaviour.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjId(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...