35 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
40 $this->nav_history =
$DIC[
"ilNavigationHistory"];
41 $this->
help = $DIC[
"ilHelp"];
42 $this->tabs =
$DIC->tabs();
43 $this->toolbar =
$DIC->toolbar();
44 $this->
user = $DIC->user();
59 $link = $this->ctrl->getLinkTarget($this,
"view");
60 $ilNavigationHistory->addItem($this->node_id, $link,
"prtt");
63 $next_class = $this->ctrl->getNextClass($this);
64 $cmd = $this->ctrl->getCmd(
"view");
66 switch ($next_class) {
67 case 'ilportfoliotemplatepagegui':
77 case "ilinfoscreengui":
83 case "ilcommonactiondispatchergui":
85 $this->ctrl->forwardCommand($gui);
88 case "ilpermissiongui":
90 $this->tabs_gui->activateTab(
"id_permissions");
92 $this->ctrl->forwardCommand($perm_gui);
95 case "ilobjectcopygui":
99 $this->ctrl->forwardCommand($cp);
104 $this->tabs_gui->activateTab(
"export");
106 $exp_gui->addFormat(
"xml");
107 $this->ctrl->forwardCommand($exp_gui);
110 case "ilobjstylesheetgui":
111 $this->ctrl->setReturn($this,
"editStyleProperties");
112 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
113 $style_gui->omitLocator();
114 if ($cmd ==
"create" ||
$_GET[
"new_type"] ==
"sty") {
115 $style_gui->setCreationMode(
true);
118 if ($cmd ==
"confirmedDelete") {
119 $this->
object->setStyleSheetId(0);
120 $this->
object->update();
123 $ret = $this->ctrl->forwardCommand($style_gui);
125 if ($cmd ==
"save" || $cmd ==
"copyStyle" || $cmd ==
"importStyle") {
127 $this->
object->setStyleSheetId($style_id);
128 $this->
object->update();
129 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
143 $ilHelp->setScreenIdComponent(
"prtt");
146 $this->tabs_gui->addTab(
148 $this->lng->txt(
"content"),
149 $this->ctrl->getLinkTarget($this,
"view")
154 $this->tabs_gui->addTab(
156 $this->lng->txt(
"info_short"),
157 $this->ctrl->getLinkTargetByClass(array(
"ilobjportfoliotemplategui",
"ilinfoscreengui"),
"showSummary")
162 $this->tabs_gui->addTab(
164 $this->lng->txt(
"settings"),
165 $this->ctrl->getLinkTarget($this,
"edit")
168 $this->tabs_gui->addTab(
170 $this->lng->txt(
"export"),
171 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
"")
176 $this->tabs_gui->addNonTabbedLink(
178 $this->lng->txt(
"user_profile_preview"),
179 $this->ctrl->getLinkTarget($this,
"preview")
194 $this->ctrl->setCmd(
"showSummary");
195 $this->ctrl->setCmdClass(
"ilinfoscreengui");
207 $ilTabs->activateTab(
"id_info");
212 $this->lng->loadLanguageModule(
"cntr");
215 $button->setPrimary(
true);
216 $button->setCaption(
"prtf_create_portfolio_from_template");
217 $button->setUrl($this->ctrl->getLinkTarget($this,
"createfromtemplate"));
218 $ilToolbar->addButtonInstance($button);
223 $info->enablePrivateNotes();
230 $info->enableNewsEditing(
false);
233 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
235 if ($enable_internal_rss) {
236 $info->setBlockProperty(
"news",
"settings",
true);
237 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
242 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
244 $this->ctrl->forwardCommand($info);
258 $opts = array(
"" => $this->lng->txt(
"please_select"));
259 foreach ($all as $item) {
260 $opts[$item[
"id"]] = $item[
"title"];
262 $prtf =
new ilSelectInputGUI($this->lng->txt(
"prtf_create_template_from_portfolio"),
"prtf");
263 $prtf->setInfo($this->lng->txt(
"prtf_create_template_from_portfolio_info"));
264 $prtf->setOptions($opts);
280 ilUtil::sendSuccess($this->lng->txt(
"prtt_portfolio_created"),
true);
281 $this->ctrl->setParameter($this,
"prt_id", $a_new_object->
getId());
282 $this->ctrl->redirect($this,
"view");
290 $this->lng->loadLanguageModule(
'rep');
293 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
297 $act_obj_info = $act_ref_info =
"";
299 $act_obj_info =
' ' . $this->lng->txt(
'rep_activation_online_object_info');
300 $act_ref_info = $this->lng->txt(
'rep_activation_access_ref_info');
304 $online->setInfo($this->lng->txt(
'prtt_activation_online_info') . $act_obj_info);
308 $dur->setShowTime(
true);
309 $dur->setEndText($this->lng->txt(
'rep_activation_limited_end'));
312 $visible =
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_limited_visibility'),
'access_visiblity');
313 $visible->setInfo($this->lng->txt(
'prtt_activation_limited_visibility_info'));
314 $dur->addSubItem($visible);
317 $section->setTitle($this->lng->txt(
'obj_presentation'));
321 $obj_service->commonSettings()->legacyForm($a_form, $this->
object)->addTileImage();
324 parent::initEditCustomForm($a_form);
327 $tit->setInfo($this->lng->txt(
'prtt_title_info'));
332 $a_values[
"online"] = $this->
object->isOnline();
333 $a_values[
"access_period"][
"start"] = $this->
object->getActivationStartDate()
336 $a_values[
"access_period"][
"end"] = $this->
object->getActivationEndDate()
339 $a_values[
"access_visiblity"] = $this->
object->getActivationVisibility();
341 parent::getEditFormCustomValues($a_values);
348 $this->
object->setOnline($a_form->
getInput(
"online"));
352 if ($period->getStart() && $period->getEnd()) {
353 $this->
object->setActivationLimited(
true);
354 $this->
object->setActivationVisibility($a_form->
getInput(
"access_visiblity"));
355 $this->
object->setActivationStartDate($period->getStart()->get(
IL_CAL_UNIX));
356 $this->
object->setActivationEndDate($period->getEnd()->get(
IL_CAL_UNIX));
358 $this->
object->setActivationLimited(
false);
361 parent::updateCustom($a_form);
363 $obj_service->commonSettings()->legacyForm($a_form, $this->
object)->saveTileImage();
380 if (!$a_portfolio_id && $this->
object) {
381 $a_portfolio_id = $this->
object->getId();
384 $page->setPortfolioId($a_portfolio_id);
397 $this->object->getId(),
400 $this->object->hasPublicComments()
408 return "ilportfoliotemplatepagegui";
415 $hi->setValue(
"old");
420 foreach ($all as $id => $title) {
421 $options[$id] = $title;
424 $prtf->setRequired(
true);
425 $prtf->setOptions($options);
443 $form->setFormAction($this->ctrl->getFormAction($this));
446 $obj->setRequired(
true);
447 $form->addItem($obj);
450 $form->setTitle($this->lng->txt(
"prtf_add_blog") .
": " .
451 $this->object->getTitle());
452 $form->addCommandButton(
"saveBlog", $this->lng->txt(
"save"));
453 $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
464 if ($form->checkInput() && $this->checkPermissionBool(
"write")) {
467 $page->setTitle($form->getInput(
"blog"));
470 ilUtil::sendSuccess($this->lng->txt(
"prtf_blog_page_created"),
true);
471 $this->ctrl->redirect($this,
"view");
474 $this->tabs_gui->clearTargets();
475 $this->tabs_gui->setBackTarget(
476 $this->lng->txt(
"back"),
477 $this->ctrl->getLinkTarget($this,
"view")
480 $form->setValuesByPost();
481 $this->tpl->setContent($form->getHtml());
493 $this->lng->loadLanguageModule(
"cntr");
496 $button->setPrimary(
true);
497 $button->setCaption(
"prtf_create_portfolio_from_template");
498 $button->setUrl($this->ctrl->getLinkTarget($this,
"createfromtemplate"));
499 $this->tpl->setHeaderActionMenu($button->render());
502 return parent::preview($a_return,
$a_content, $a_show_notes);
507 $this->ctrl->setParameterByClass(
"ilobjportfoliogui",
"prtt_pre", $this->object->getId());
508 $this->ctrl->redirectByClass(array(
"ilDashboardGUI",
"ilportfoliorepositorygui",
"ilobjportfoliogui"),
"create");
513 $this->ctrl->setParameterByClass(
"ilobjportfoliogui",
"prtt_pre", $this->object->getId());
514 $this->ctrl->redirectByClass(array(
"ilDashboardGUI",
"ilportfoliorepositorygui",
"ilobjportfoliogui"),
"createFromTemplateDirect");
517 public static function _goto($a_target)
525 $id = explode(
"_", $a_target);
528 $ctrl->setParameterByClass(
"ilRepositoryGUI",
"ref_id",
$ref_id);
530 $ctrl->redirectByClass(
"ilRepositoryGUI",
"preview");
532 $ctrl->redirectByClass(
"ilRepositoryGUI",
"infoScreen");
An exception for terminatinating execution or to throw for unit testing.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
@classDescription Date and time handling
Export User Interface Class.
Portfolio view gui base class.
getAdditional()
Get Additonal Information.
static clonePagesAndSettings(ilObjPortfolioBase $a_source, ilObjPortfolioBase $a_target, array $a_recipe=null, $copy_all=false)
Build template from portfolio and vice versa.
Portfolio template view gui class.
updateCustom(ilPropertyFormGUI $a_form)
Insert custom update form values into object.
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
saveBlog()
Create new portfolio blog template page.
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
getPageGUIInstance($a_page_id)
Get portfolio template page gui instance.
getType()
Functions that must be overwritten.
initDidacticTemplate(ilPropertyFormGUI $a_form)
Show didactic template types.
setTabs()
create tabs (repository/workspace switch)
infoScreenForward()
show information screen
preview($a_return=false, $a_content=false, $a_show_notes=true)
Show user page.
getEditFormCustomValues(array &$a_values)
Add values to custom edit fields.
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
getPageInstance($a_page_id=null, $a_portfolio_id=null)
Get portfolio template page instance.
initCopyPageFormOptions(ilPropertyFormGUI $a_form)
initBlogForm()
Init blog template page form.
executeCommand()
execute command
static getAvailablePortfolioTemplates($a_permission="read")
static getPortfoliosOfUser($a_user_id)
Get views of user.
Class ilObjStyleSheetGUI.
executeCommand()
execute command
setTabs()
create tabs (repository/workspace switch)
getAccessHandler()
Get access handler.
prepareOutput($a_show_subobjects=true)
prepare output
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
getCreationMode()
get creation mode
GUI class for the workflow of copying objects.
addHeaderAction()
Add header action menu.
Class ilObject Basic functions for all objects.
static _getAllReferences($a_id)
get all reference ids of object
getId()
get object id @access public
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Portfolio template page gui class.
Page for portfolio template.
This class represents a text property in a property form.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc