ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ObjectFacade.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
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
85 public function getExportStyleId(): int
86 {
87 return $this->object_manager->getEffectiveStyleId();
88 }
89
95 public function updateStyleId(int $style_id): void
96 {
97 $this->object_manager->updateStyleId($style_id);
98 }
99
103 public function inheritFromParent(): void
104 {
105 $this->object_manager->inheritFromParent();
106 }
107}
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.
getExportStyleId()
This is the ID of the style that will be exported with the content 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.
Class ilObject Basic functions for all objects.
static _lookupObjId(int $ref_id)