public function updateCustom(ilPropertyFormGUI $a_form)
 {
     $this->object->setOnline($a_form->getInput("online"));
     // if portfolio is not online, it cannot be default
     if (!$a_form->getInput("online")) {
         ilObjPortfolio::setUserDefault($this->user_id, 0);
     }
     parent::updateCustom($a_form);
 }
 public function updateCustom(ilPropertyFormGUI $a_form)
 {
     $this->object->setOnline($a_form->getInput("online"));
     // activation
     if ($a_form->getInput("access_type") == ilObjectActivation::TIMINGS_ACTIVATION) {
         $this->object->setActivationLimited(true);
         $this->object->setActivationVisibility($a_form->getInput("access_visiblity"));
         $period = $a_form->getItemByPostVar("access_period");
         $this->object->setActivationStartDate($period->getStart()->get(IL_CAL_UNIX));
         $this->object->setActivationEndDate($period->getEnd()->get(IL_CAL_UNIX));
     } else {
         $this->object->setActivationLimited(false);
     }
     parent::updateCustom($a_form);
 }
 function preview($a_return = false, $a_content = false, $a_show_notes = true)
 {
     if (!$this->checkPermissionBool("write") && $this->checkPermissionBool("read")) {
         $this->lng->loadLanguageModule("cntr");
         include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
         $button = ilLinkButton::getInstance();
         $button->setPrimary(true);
         $button->setCaption("prtf_create_portfolio_from_template");
         $button->setUrl($this->ctrl->getLinkTarget($this, "createfromtemplate"));
         $this->tpl->setHeaderActionMenu($button->render());
     }
     return parent::preview($a_return, $a_content, $a_show_notes);
 }