38 if (($this->ref_id ?? 0) > 0) {
40 switch ($activation[
"timing_type"]) {
55 protected function doCreate(
bool $clone_mode =
false): void
57 parent::doCreate($clone_mode);
71 foreach ($pages as $page) {
73 $page_obj->setPortfolioId($this->
id);
84 if (!$cp_options->isRootNode($this->getRefId())) {
85 $new_obj->setOnline($this->
isOnline());
88 self::cloneBasics($this, $new_obj);
97 $new_page->setPortfolioId($new_obj->
getId());
98 $new_page->setTitle($page->getTitle());
99 $new_page->setType($page->getType());
100 $new_page->setOrderNr($page->getOrderNr());
101 $new_page->create(
false);
103 $page->copy($new_page->getId(),
"", $new_obj->
getId(),
true, $a_copy_id);
115 if (($this->ref_id ?? 0) > 0) {
128 $item->update($this->ref_id);
139 $this->activation_limited = $a_value;
144 $this->activation_visibility = $a_value;
154 $this->activation_starting_time = $starting_time;
159 $this->activation_ending_time = $ending_time;
164 return ($this->activation_starting_time > 0) ? $this->activation_starting_time : null;
169 return ($this->activation_ending_time > 0) ? $this->activation_ending_time : null;
177 string $a_permission =
"read" 182 $ilAccess = $DIC->access();
187 $has_permission =
false;
189 if ($obj[
"owner"] ==
$ilUser->getId()) {
190 $has_permission =
true;
193 if ($ilAccess->checkAccess($a_permission,
"",
$ref_id)) {
194 $has_permission =
true;
200 if ($has_permission) {
201 $res[$obj[
"obj_id"]] = $obj[
"title"];
static getAllPortfolioPages(int $a_portfolio_id)
Get pages of portfolio.
int $activation_ending_time
int $activation_starting_time
setActivationLimited(bool $a_value)
static _getAllReferences(int $id)
get all reference ids for object ID
doCloneObject(ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id=null)
const TIMINGS_DEACTIVATED
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getObjectsByType(string $obj_type="", int $owner=null)
setActivationVisibility(bool $a_value)
static getAvailablePortfolioTemplates(string $a_permission="read")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getActivationVisibility()
static getItem(int $ref_id)
setActivationStartDate(?int $starting_time=null)
bool $activation_visibility
static _getInstance(int $a_copy_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setActivationEndDate(?int $ending_time=null)
Class ilObjectActivation.
doCreate(bool $clone_mode=false)