ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Style\Content\Object\ObjectFacade Class Reference

External facade for object content styles. More...

+ Collaboration diagram for ILIAS\Style\Content\Object\ObjectFacade:

Public Member Functions

 __construct (InternalDataService $data_service, InternalDomainService $domain_service, int $ref_id, int $obj_id=0)
 
 cloneTo (int $obj_id)
 This must be called on cloning the parent object, with passing the object id of the clone. More...
 
 getEffectiveStyleId ()
 This ID must be used when rendering the object (pages). More...
 
 getStyleId ()
 Get the style ID currently set (stored) by the object. More...
 
 getExportStyleId ()
 This is the ID of the style that will be exported with the content object. More...
 
 updateStyleId (int $style_id)
 Calling this should usually be avoided, currently this is necessary on import routines, but otherwise updates should be called internally automatically. More...
 
 inheritFromParent ()
 Inherits a non local style from the parent container. More...
 

Protected Attributes

ObjectManager $object_manager
 
int $ref_id
 
int $obj_id
 
InternalDataService $data_service
 
InternalDomainService $domain_service
 

Detailed Description

External facade for object content styles.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Style\Content\Object\ObjectFacade::__construct ( InternalDataService  $data_service,
InternalDomainService  $domain_service,
int  $ref_id,
int  $obj_id = 0 
)

Definition at line 39 of file class.ObjectFacade.php.

References ILIAS\Style\Content\Object\ObjectFacade\$domain_service, ILIAS\Style\Content\Object\ObjectFacade\$ref_id, ilObject\_lookupObjId(), and ILIAS\Style\Content\InternalDomainService\object().

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  }
static _lookupObjId(int $ref_id)
object(int $ref_id, int $obj_id=0)
Objects without ref id (e.g.
+ Here is the call graph for this function:

Member Function Documentation

◆ cloneTo()

ILIAS\Style\Content\Object\ObjectFacade::cloneTo ( int  $obj_id)

This must be called on cloning the parent object, with passing the object id of the clone.

Definition at line 57 of file class.ObjectFacade.php.

57  : void
58  {
59  $this->object_manager->cloneTo($obj_id);
60  }

◆ getEffectiveStyleId()

ILIAS\Style\Content\Object\ObjectFacade::getEffectiveStyleId ( )

This ID must be used when rendering the object (pages).

It respects global settings like fixed style IDs.

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

66  : int
67  {
68  return $this->object_manager->getEffectiveStyleId();
69  }

◆ getExportStyleId()

ILIAS\Style\Content\Object\ObjectFacade::getExportStyleId ( )

This is the ID of the style that will be exported with the content object.

Definition at line 85 of file class.ObjectFacade.php.

85  : int
86  {
87  return $this->object_manager->getEffectiveStyleId();
88  }

◆ getStyleId()

ILIAS\Style\Content\Object\ObjectFacade::getStyleId ( )

Get the style ID currently set (stored) by the object.

Note: This may be different from the effective style id, e.g. if a fixed global style overwrites the ID of the current object, or the ID of the current object is invalid, e.g. by referencing a non-shared parent style ID.

Definition at line 77 of file class.ObjectFacade.php.

77  : int
78  {
79  return $this->object_manager->getStyleId();
80  }

◆ inheritFromParent()

ILIAS\Style\Content\Object\ObjectFacade::inheritFromParent ( )

Inherits a non local style from the parent container.

Definition at line 103 of file class.ObjectFacade.php.

103  : void
104  {
105  $this->object_manager->inheritFromParent();
106  }

◆ updateStyleId()

ILIAS\Style\Content\Object\ObjectFacade::updateStyleId ( int  $style_id)

Calling this should usually be avoided, currently this is necessary on import routines, but otherwise updates should be called internally automatically.

Definition at line 95 of file class.ObjectFacade.php.

95  : void
96  {
97  $this->object_manager->updateStyleId($style_id);
98  }

Field Documentation

◆ $data_service

InternalDataService ILIAS\Style\Content\Object\ObjectFacade::$data_service
protected

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

◆ $domain_service

InternalDomainService ILIAS\Style\Content\Object\ObjectFacade::$domain_service
protected

◆ $obj_id

int ILIAS\Style\Content\Object\ObjectFacade::$obj_id
protected

Definition at line 35 of file class.ObjectFacade.php.

◆ $object_manager

ObjectManager ILIAS\Style\Content\Object\ObjectFacade::$object_manager
protected

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

◆ $ref_id

int ILIAS\Style\Content\Object\ObjectFacade::$ref_id
protected

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