37 public function __construct($tableview_id, $a_definition_id = 0)
41 $ilCtrl =
$DIC[
'ilCtrl'];
45 $this->ctrl = $ilCtrl;
51 $viewdef->setId($tableview_id);
53 $viewdef->setActive(
false);
60 $this->table_gui = $table;
61 $this->tpl->setContent($table->getHTML());
71 $ilLocator =
$DIC[
'ilLocator'];
74 $next_class = $this->ctrl->getNextClass($this);
78 $this->ctrl->setParameter($this,
"dclv", $viewdef->getId());
79 $title =
$lng->txt(
"dcl_view_viewdefinition");
82 switch ($next_class) {
83 case "ilpageobjectgui":
84 throw new ilCOPageException(
"Deprecated. ilDclDetailedViewDefinitionGUI gui forwarding to ilpageobject");
88 $ilLocator->addItem($title, $this->ctrl->getLinkTarget($this,
"preview"));
91 return parent::executeCommand();
102 $page->setActive(
true);
104 $this->ctrl->redirect($this,
'edit');
114 $page->setActive(
false);
116 $this->ctrl->redirect($this,
'edit');
126 $ilCtrl =
$DIC[
'ilCtrl'];
131 $conf->setFormAction($ilCtrl->getFormAction($this));
132 $conf->setHeaderText(
$lng->txt(
'dcl_confirm_delete_detailed_view_title'));
134 $conf->addItem(
'tableview', (
int) $this->tableview_id,
$lng->txt(
'dcl_confirm_delete_detailed_view_text'));
136 $conf->setConfirm(
$lng->txt(
'delete'),
'deleteView');
137 $conf->setCancel(
$lng->txt(
'cancel'),
'cancelDelete');
139 $tpl->setContent($conf->getHTML());
149 $ilCtrl =
$DIC[
'ilCtrl'];
151 $ilCtrl->redirect($this,
"edit");
161 $ilCtrl =
$DIC[
'ilCtrl'];
166 $pageObject->delete();
169 ilUtil::sendSuccess(
$lng->txt(
"dcl_empty_detailed_view_success"),
true);
172 $ilCtrl->redirectByClass(
"ilDclTableViewEditGUI",
"editGeneralSettings");
183 $ilCtrl =
$DIC[
'ilCtrl'];
187 ilUtil::sendSuccess(
$lng->txt(
"cont_page_lock_released"),
true);
188 $ilCtrl->redirectByClass(
'ilDclTableViewGUI',
"show");
221 foreach ($allp as $item) {
222 $a_output = str_replace($item,
"<span style=\"color:green\">" . $item .
"</span>", $a_output);
234 public function saveTable() {
239 foreach ($this->tableview->getFieldSettings() as $setting) {
241 if (!$setting->getFieldObject()->isStandardField() || $setting->getFieldObject()->getId() ===
'owner') {
244 foreach (array(
"RadioGroup") as $attribute) {
245 $selection_key = $attribute .
'_' . $setting->getField();
246 $selection =
$_POST[$selection_key];
247 $selected_radio_attribute = explode(
"_", $selection)[0];
249 foreach (array(
"LockedEdit",
"RequiredEdit",
"VisibleEdit",
"NotVisibleEdit") as $radio_attribute) {
252 if ($selected_radio_attribute === $radio_attribute) {
256 $setting->{
'set' . $radio_attribute}(
$result);
261 foreach (array(
"DefaultValue") as $attribute) {
262 $key = $attribute .
'_' . $setting->getField();
263 $setting->{
'set' . $attribute}(
$_POST[$key]);
272 if (!is_null($view)) {
273 $view->setStepE(
true);
277 ilUtil::sendSuccess($this->lng->txt(
'dcl_msg_tableview_updated'),
true);
278 $this->ctrl->saveParameter($this,
'tableview_id');
279 $this->ctrl->redirect($this,
'presentation');
static findOrGetInstance($primary_key, array $add_constructor_args=array())
An exception for terminatinating execution or to throw for unit testing.
Base exception class for copage service.
Confirmation screen class.
Class ilDclDetailedViewDefinition.
Class ilDclEditViewDefinitionGUI.
releasePageLock()
Release page lock overwrite to redirect properly.
executeCommand()
execute command
cancelDelete()
cancelDelete
postOutputProcessing($a_output)
Finalizing output processing.
confirmDelete()
confirmDelete
Class ilDclEditViewDefinition.
Class ilDclEditViewTableGUI.
static _lookupObjectId($a_ref_id)
lookup object id
__construct( $a_parent_type, $a_id, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="", $concrete_lang="")
Constructor.
setPresentationTitle($a_title="")
getPageObject()
Get Page Object.
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc