3declare(strict_types=1);
52 $this->
settings = $domain_service->settings();
61 $this->log = $this->domain_service->log();
72 $tree = $this->domain_service->repositoryTree();
76 if ($fixed_style > 0) {
85 if ($this->ref_id > 0) {
86 $path = $tree->getPathId($this->ref_id);
88 $container_obj_ids = array_map(
function (
$ref_id) {
91 foreach ($this->object_repo->getOwnedStyles($container_obj_ids) as
$obj_id => $style_id) {
92 $st_styles[$style_id] =
105 if (isset($sel_types[$style_id])) {
131 $this->log->debug(
"Cloning style from ref id: " . $this->ref_id .
132 ", obj id: " . $this->obj_id .
", style id: " . $this->
getStyleId() .
", to new obj id: " .
137 $new_id = $style_obj->ilClone();
150 if ($this->ref_id > 0) {
151 $tree = $this->domain_service->repositoryTree();
152 $parent_ref_id = $tree->getParentId($this->ref_id);
178 if ($fixed_style > 0) {
179 $style_id = $fixed_style;
183 if ($style_id <= 0) {
196 return $this->object_repo->isOwned($this->obj_id, $style_id);
201 $fixed_style = (
int) $this->
settings->get(
"fixed_content_style_id");
202 if ($fixed_style > 0) {
211 $fixed_style = (
int) $this->
settings->get(
"fixed_content_style_id");
222 if ($current_style > 0 && $this->
isOwned($current_style)) {
Repository internal repo service.
This repo stores infos on repository objects that are using booking managers as a service (resource m...
filterByReuse(array $ref_ids)
For an array of ref ids, return only the ref ids that have the reuse flag set.
Content style internal repo service.
object()
Objects without ref id (e.g.
This repo stores infos on repository objects that are using booking managers as a service (resource m...
Manages repository object related content style behaviour.
setOwnerOfStyle(int $style_id)
hasEffectiveIndividualStyle(int $current_style)
cloneTo(int $obj_id)
Clones a style to a new object (or references the same standard style)
InternalDomainService $domain_service
InternalRepoService $repo_service
canSelectStyle(int $current_style)
getSelectableStyles()
Get all selectable styles.
isSelectable(int $style_id)
inheritFromParent()
Inherits a non local style from the parent container.
__construct(InternalRepoService $repo_service, InternalDomainService $domain_service, int $ref_id, int $obj_id=0)
ObjectDBRepository $object_repo
ContainerDBRepository $container_repo
updateStyleId(int $style_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupStandard(int $a_id)
Lookup standard flag.
static _getStandardStyles(bool $a_exclude_default_style=false, bool $a_include_deactivated=false, int $a_scope=0)
Get standard styles.
static writeStyleUsage(int $a_obj_id, int $a_style_id)
Write style usage.
static writeOwner($obj_id, $style_id)
static lookupObjectStyle(int $a_obj_id)
Lookup object style.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
get(string $a_keyword, ?string $a_default_value=null)
get setting
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...