38 int $a_id_type = self::REPOSITORY_NODE_ID,
39 int $a_parent_node_id = 0
44 $this->nav_history = $DIC[
"ilNavigationHistory"];
45 $this->
help = $DIC[
"ilHelp"];
46 $this->
tabs = $DIC->tabs();
47 $this->
toolbar = $DIC->toolbar();
48 $this->
user = $DIC->user();
63 $link = $this->
ctrl->getLinkTarget($this,
"view");
64 $ilNavigationHistory->addItem($this->node_id, $link,
"prtt");
67 $next_class = $this->
ctrl->getNextClass($this);
68 $cmd = $this->
ctrl->getCmd(
"view");
69 switch ($next_class) {
70 case 'ilportfoliotemplatepagegui':
80 case "ilinfoscreengui":
86 case "ilcommonactiondispatchergui":
89 $this->
ctrl->forwardCommand($gui);
92 case "ilpermissiongui":
94 $this->tabs_gui->activateTab(
"id_permissions");
96 $this->
ctrl->forwardCommand($perm_gui);
99 case "ilobjectcopygui":
102 $cp->setType(
"prtt");
103 $this->
ctrl->forwardCommand($cp);
108 $this->tabs_gui->activateTab(
"export");
110 $exp_gui->addFormat(
"xml");
111 $this->
ctrl->forwardCommand($exp_gui);
114 case "ilobjectcontentstylesettingsgui":
118 $this->tabs_gui->activateTab(
"settings");
120 $settings_gui = $this->content_style_gui
121 ->objectSettingsGUIForRefId(
125 $this->
ctrl->forwardCommand($settings_gui);
128 case "ilobjectmetadatagui":
132 $this->tabs_gui->activateTab(
"advmd");
134 $this->
ctrl->forwardCommand($md_gui);
150 $this->tabs_gui->addTab(
152 $this->
lng->txt(
"content"),
153 $this->
ctrl->getLinkTarget($this,
"view")
158 $this->tabs_gui->addTab(
160 $this->
lng->txt(
"info_short"),
161 $this->
ctrl->getLinkTargetByClass(array(
"ilobjportfoliotemplategui",
"ilinfoscreengui"),
"showSummary")
166 $this->tabs_gui->addTab(
168 $this->
lng->txt(
"settings"),
169 $this->
ctrl->getLinkTarget($this,
"edit")
173 $mdtab = $mdgui->getTab();
175 $this->tabs_gui->addTab(
177 $this->
lng->txt(
"meta_data"),
182 $this->tabs_gui->addTab(
184 $this->
lng->txt(
"export"),
185 $this->
ctrl->getLinkTargetByClass(
"ilexportgui",
"")
190 $this->tabs_gui->addNonTabbedLink(
192 $this->
lng->txt(
"preview"),
193 $this->
ctrl->getLinkTarget($this,
"preview")
206 $this->
ctrl->setCmd(
"showSummary");
207 $this->
ctrl->setCmdClass(
"ilinfoscreengui");
216 $ilTabs->activateTab(
"id_info");
221 $this->
lng->loadLanguageModule(
"cntr");
224 $button->setPrimary(
true);
225 $button->setCaption(
"prtf_create_portfolio_from_template");
226 $button->setUrl($this->
ctrl->getLinkTarget($this,
"createfromtemplate"));
227 $ilToolbar->addButtonInstance($button);
232 $info->enablePrivateNotes();
239 $info->enableNewsEditing(
false);
242 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
244 if ($enable_internal_rss) {
245 $info->setBlockProperty(
"news",
"settings",
true);
246 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
251 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
253 $this->
ctrl->forwardCommand($info);
267 $opts = array(
"" => $this->
lng->txt(
"please_select"));
268 foreach ($all as $item) {
269 $opts[$item[
"id"]] = $item[
"title"];
271 $prtf =
new ilSelectInputGUI($this->
lng->txt(
"prtf_create_template_from_portfolio"),
"prtf");
272 $prtf->setInfo($this->
lng->txt(
"prtf_create_template_from_portfolio_info"));
273 $prtf->setOptions($opts);
282 if ($this->port_request->getPortfolioId() > 0) {
290 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"prtt_portfolio_created"),
true);
291 $this->
ctrl->setParameter($this,
"prt_id", $new_object->
getId());
292 $this->
ctrl->redirect($this,
"view");
300 $this->
lng->loadLanguageModule(
'rep');
303 $section->setTitle($this->
lng->txt(
'rep_activation_availability'));
307 $act_obj_info = $act_ref_info =
"";
309 $act_obj_info =
' ' . $this->
lng->txt(
'rep_activation_online_object_info');
310 $act_ref_info = $this->
lng->txt(
'rep_activation_access_ref_info');
314 $online->
setInfo($this->
lng->txt(
'prtt_activation_online_info') . $act_obj_info);
319 $dur->setEndText($this->
lng->txt(
'rep_activation_limited_end'));
322 $visible =
new ilCheckboxInputGUI($this->
lng->txt(
'rep_activation_limited_visibility'),
'access_visiblity');
323 $visible->
setInfo($this->
lng->txt(
'prtt_activation_limited_visibility_info'));
324 $dur->addSubItem($visible);
327 $section->setTitle($this->
lng->txt(
'obj_presentation'));
331 $obj_service->commonSettings()->legacyForm($a_form, $this->
object)->addTileImage();
334 parent::initEditCustomForm($a_form);
345 $tit->setInfo($this->
lng->txt(
'prtt_title_info'));
350 $a_values[
"online"] = $this->
object->isOnline();
351 $a_values[
"access_period"][
"start"] = $this->
object->getActivationStartDate()
354 $a_values[
"access_period"][
"end"] = $this->
object->getActivationEndDate()
357 $a_values[
"access_visiblity"] = $this->
object->getActivationVisibility();
365 parent::getEditFormCustomValues($a_values);
372 $this->
object->setOnline($form->
getInput(
"online"));
376 if ($period->getStart() && $period->getEnd()) {
377 $this->
object->setActivationLimited(
true);
378 $this->
object->setActivationVisibility($form->
getInput(
"access_visiblity"));
379 $this->
object->setActivationStartDate($period->getStart()->get(
IL_CAL_UNIX));
380 $this->
object->setActivationEndDate($period->getEnd()->get(
IL_CAL_UNIX));
382 $this->
object->setActivationLimited(
false);
385 parent::updateCustom($form);
387 $obj_service->commonSettings()->legacyForm($form, $this->
object)->saveTileImage();
407 ?
int $a_page_id = null,
408 ?
int $a_portfolio_id = null
410 if (!$a_portfolio_id && $this->
object) {
411 $a_portfolio_id = $this->
object->
getId();
414 $page->setPortfolioId($a_portfolio_id);
428 $this->
object->hasPublicComments()
436 return "ilportfoliotemplatepagegui";
443 $hi->setValue(
"old");
448 foreach ($all as
$id => $title) {
449 $options[
$id] = $title;
452 $prtf->setRequired(
true);
453 $prtf->setOptions($options);
468 $form->setFormAction($this->
ctrl->getFormAction($this));
471 $obj->setRequired(
true);
472 $form->addItem($obj);
475 $form->setTitle($this->
lng->txt(
"prtf_add_blog") .
": " .
476 $this->
object->getTitle());
477 $form->addCommandButton(
"saveBlog", $this->
lng->txt(
"save"));
478 $form->addCommandButton(
"view", $this->
lng->txt(
"cancel"));
489 $page->setTitle($form->getInput(
"blog"));
490 $page->create(
false);
492 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"prtf_blog_page_created"),
true);
493 $this->
ctrl->redirect($this,
"view");
496 $this->tabs_gui->clearTargets();
497 $this->tabs_gui->setBackTarget(
498 $this->
lng->txt(
"back"),
499 $this->
ctrl->getLinkTarget($this,
"view")
502 $form->setValuesByPost();
503 $this->tpl->setContent($form->getHTML());
512 bool $a_return =
false,
514 bool $a_show_notes =
true 518 $this->
lng->loadLanguageModule(
"cntr");
521 $button->setPrimary(
true);
522 $button->setCaption(
"prtf_create_portfolio_from_template");
523 $button->setUrl($this->
ctrl->getLinkTarget($this,
"createfromtemplate"));
524 $this->tpl->setHeaderActionMenu($button->render());
527 return parent::preview($a_return, $a_content, $a_show_notes);
532 $this->
ctrl->setParameterByClass(
"ilobjportfoliogui",
"prtt_pre", $this->
object->getId());
533 $this->
ctrl->redirectByClass(array(
"ilDashboardGUI",
"ilportfoliorepositorygui",
"ilobjportfoliogui"),
"create");
538 $this->
ctrl->setParameterByClass(
"ilobjportfoliogui",
"prtt_pre", $this->
object->getId());
539 $this->
ctrl->redirectByClass(array(
"ilDashboardGUI",
"ilportfoliorepositorygui",
"ilobjportfoliogui"),
"createFromTemplateDirect");
542 public static function _goto(
string $a_target):
void 548 $ctrl = $DIC->ctrl();
550 $id = explode(
"_", $a_target);
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
executeCommand()
execute command
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
GUI class for the workflow of copying objects.
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
static _getAllReferences(int $id)
get all reference ids for object ID
initBlogForm()
Init blog template page form.
getEditFormCustomValues(array &$a_values)
setParameterByClass(string $a_class, string $a_parameter, $a_value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
prepareOutput(bool $show_sub_objects=true)
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
__construct(int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
getPageGUIInstance(int $a_page_id)
Get portfolio template page gui instance.
handlePageCall(string $a_cmd)
static getAvailablePortfolioTemplates(string $a_permission="read")
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static clonePagesAndSettings(ilObjPortfolioBase $a_source, ilObjPortfolioBase $a_target, ?array $a_recipe=null, bool $copy_all=false)
Build template from portfolio and vice versa.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
ilNavigationHistory $nav_history
initEditCustomForm(ilPropertyFormGUI $a_form)
setScreenIdComponent(string $a_comp)
static getPortfoliosOfUser(int $a_user_id)
Get portfolios of user.
updateCustom(ilPropertyFormGUI $form)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
afterSave(ilObject $new_object)
Post (successful) object creation hook.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
Navigation History of Repository Items.
initDidacticTemplate(ilPropertyFormGUI $form)
Portfolio view gui base class.
setTabs()
create tabs (repository/workspace switch)
preview(bool $a_return=false, $a_content=false, bool $a_show_notes=true)
ilObjectService $object_service
initCopyPageFormOptions(ilPropertyFormGUI $a_form)
infoScreen()
this one is called from the info button in the repository
setSettingsSubTabs(string $a_active)
__construct(Container $dic, ilPlugin $plugin)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
getPageInstance(?int $a_page_id=null, ?int $a_portfolio_id=null)
Get portfolio template page instance.
addHeaderAction()
Add header action menu.
setAdditional(array $a_additional)
Set Additonal Information.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...