ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilDclDetailedViewDefinitionGUI Class Reference

ilDclDetailedViewDefinitionGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMediaPoolTargetSelector ilDclDetailedViewDefinitionGUI: ilPublicUserProfileGUI, ilPageObjectGUI More...

+ Inheritance diagram for ilDclDetailedViewDefinitionGUI:
+ Collaboration diagram for ilDclDetailedViewDefinitionGUI:

Public Member Functions

 __construct (int $tableview_id)
 
 executeCommand ()
 execute command More...
 
 showPage ()
 
 confirmDelete ()
 
 cancelDelete ()
 
 deleteView ()
 
 postOutputProcessing (string $a_output)
 Finalizing output processing. More...
 
- Public Member Functions inherited from ilPageObjectGUI
 __construct (string $a_parent_type, int $a_id, int $a_old_nr=0, bool $a_prevent_get_id=false, string $a_lang="", string $concrete_lang="")
 
 setTemplate (ilGlobalTemplateInterface $main_tpl)
 
 afterConstructor ()
 
 setAdvMdRecordObject (int $a_adv_ref_id, string $a_adv_type, string $a_adv_subtype="-")
 Set object, that defines the adv md records being used. More...
 
 getAdvMdRecordObject ()
 Get adv md record type. More...
 
 setParentType (string $a_val)
 
 getParentType ()
 
 setId (int $a_val)
 
 getId ()
 
 setOldNr (int $a_val)
 Set old nr (historic page) More...
 
 getOldNr ()
 
 setLanguage (string $a_val)
 
 getLanguage ()
 
 setEnablePCType (string $a_pc_type, bool $a_val)
 
 getEnablePCType (string $a_pc_type)
 
 setPageConfig (ilPageConfig $a_val)
 
 getPageConfig ()
 
 setPageObject (ilPageObject $a_pg_obj)
 
 getPageObject ()
 
 setOutputMode (string $a_mode=self::PRESENTATION)
 
 getOutputMode ()
 
 setTemplateOutput (bool $a_output=true)
 
 outputToTemplate ()
 
 setPresentationTitle (string $a_title="")
 
 getPresentationTitle ()
 
 setHeader (string $a_title="")
 
 getHeader ()
 
 setLinkParams (string $l_params="")
 
 getLinkParams ()
 
 setLinkFrame (string $l_frame="")
 
 getLinkFrame ()
 
 setPageLinker (\ILIAS\COPage\PageLinker $page_linker)
 
 getLinkXML ()
 
 setQuestionHTML (array $question_html)
 
 getQuestionHTML ()
 
 setTemplateTargetVar (string $a_variable)
 
 getTemplateTargetVar ()
 
 getTemplateOutputVar ()
 
 setSourcecodeDownloadScript (string $script_name)
 
 getSourcecodeDownloadScript ()
 
 setTabs (ilTabsGUI $a_tabs)
 
 setPageBackTitle (string $a_title)
 
 setFileDownloadLink (string $a_download_link)
 
 getFileDownloadLink ()
 
 setFullscreenLink (string $a_fullscreen_link)
 
 getFullscreenLink ()
 
 setIntLinkReturn (string $a_return)
 
 enableChangeComments (bool $a_enabled)
 
 isEnabledChangeComments ()
 
 enableNotes (bool $a_enabled, int $a_parent_id)
 
 isEnabledNotes ()
 
 setOfflineDirectory (string $offdir)
 
 getOfflineDirectory ()
 
 setViewPageLink (string $a_link, string $a_target="")
 set link for "view page" button More...
 
 getViewPageLink ()
 
 getViewPageTarget ()
 
 getViewPageText ()
 
 setActivationListener (object $a_obj, string $a_meth)
 
 setEnabledNews (bool $a_enabled, int $a_news_obj_id=0, string $a_news_obj_type="")
 
 getEnabledNews ()
 
 setTabHook (object $a_object, string $a_function)
 
 setEditPreview (bool $a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 getEditPreview ()
 
 setEnabledTabs (bool $a_enabledtabs)
 
 getEnabledTabs ()
 
 setEnabledPageFocus (bool $a_enabledpagefocus)
 
 setOpenPlaceHolder (string $a_val)
 
 getOpenPlaceHolder ()
 
 getEnabledPageFocus ()
 
 setPrependingHtml (string $a_prependinghtml)
 
 getPrependingHtml ()
 
 setEnableEditing (bool $a_enableediting)
 
 getEnableEditing ()
 
 setRawPageContent (bool $a_rawpagecontent)
 Set Get raw page content only. More...
 
 getRawPageContent ()
 
 setStyleId (int $a_styleid)
 
 getStyleId ()
 
 setCompareMode (bool $a_val)
 
 getCompareMode ()
 
 setAbstractOnly (bool $a_val, string $pcid="")
 Get only abstract (first text paragraph) More...
 
 getAbstractOnly ()
 
 setRenderPageContainer (bool $a_val)
 
 getRenderPageContainer ()
 
 getDisabledText ()
 
 getEnabledHref ()
 
 setEnabledHref (bool $enable)
 
 activateMetaDataEditor (ilObject $a_rep_obj, string $a_type, int $a_sub_obj_id, object $a_observer_obj=null, string $a_observer_func="")
 Activate meda data editor. More...
 
 determineFileDownloadLink ()
 
 determineFullscreenLink ()
 
 determineSourcecodeDownloadScript ()
 
 getComponentPluginsXML ()
 Put information about activated plugins into XML. More...
 
 executeCommand ()
 execute command More...
 
 setQEditTabs (string $a_active)
 Set question editing tabs. More...
 
 onFeedbackEditingForwarding ()
 
 deactivatePage ()
 
 activatePage ()
 
 showPage ()
 display content of page More...
 
 replaceCurlyBrackets (string $output)
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 
 setEditMode ()
 Set edit mode. More...
 
 setDefaultLinkXml ()
 
 setLinkXml (string $xml)
 
 getProfileBackUrl ()
 
 setProfileBackUrl (string $url)
 
 downloadFile ()
 
 displayMediaFullscreen ()
 
 displayMedia (bool $a_fullscreen=false)
 
 download_paragraph ()
 download source code paragraph More...
 
 insertPageToc (string $a_output)
 
 insertResources (string $a_output)
 
 insertAdvTrigger (string $a_output)
 Insert adv content trigger. More...
 
 postOutputProcessing (string $a_output)
 Finalizing output processing. More...
 
 previewHistory ()
 Preview history. More...
 
 preview ()
 
 edit ()
 
 getBlockingInfoMessage ()
 
 insertJSAtPlaceholder ()
 
 presentation (string $a_mode=self::PRESENTATION)
 
 getHTML ()
 
 showMediaFullscreen (int $a_style_id=0)
 show fullscreen view of media object More...
 
 displayValidationError ($a_error)
 display validation error More...
 
 history ()
 Get history table as HTML. More...
 
 rollbackConfirmation ()
 Rollback confirmation. More...
 
 rollback ()
 Rollback to a previous version. More...
 
 setScreenIdComponent ()
 
 getMetaDataLink ()
 
 getTabs (string $a_activate="")
 
 compareVersion ()
 Compares two revisions of the page. More...
 
 replaceDiffTags (string $a_html)
 
 editActivation ()
 Edit activation (only, if scheduled page activation is activated in administration) More...
 
 initActivationForm ()
 Init activation form. More...
 
 getActivationFormValues ()
 Get values for activation form. More...
 
 saveActivation ()
 Save Activation. More...
 
 getNotesHTML (object $a_content_object=null, bool $a_enable_private_notes=true, bool $a_enable_public_notes=false, bool $a_enable_notes_deletion=false, callable $a_callback=null, bool $export=false)
 Get html for public and/or private notes. More...
 
 processAnswer ()
 Process answer. More...
 
 initialOpenedContent ()
 Initially opened content. More...
 
 initOpenedContentForm ()
 
 saveInitialOpenedContent ()
 
 switchToLanguage ()
 Switch to language. More...
 
 confirmPageTranslationCreation ()
 Confirm page translation creation. More...
 
 editMasterLanguage ()
 Edit master language. More...
 
 createPageTranslation ()
 Create page translation. More...
 
 releasePageLock ()
 Release page lock. More...
 
 finishEditing ()
 
 getPagePermaLink ()
 
 getAdditionalPageActions ()
 Get additional page actions. More...
 
 afterDeleteContents ()
 

Protected Member Functions

 activate ()
 
 deactivate ()
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 showEditToolbar ()
 Show edit toolbar. More...
 
 setEditorToolContext ()
 Set editor tool context. More...
 
 initEditing ()
 
 showEditLockInfo ()
 
 setBackToEditTabs ()
 
 setBackToHistoryTabs ()
 
 checkLangPageAvailable (int $id, string $lang)
 
 isPageContainerToBeRendered ()
 
 addResourcesToTemplate (ilGlobalTemplateInterface $tpl)
 Add resources to template. More...
 

Protected Attributes

int $tableview_id
 
ILIAS HTTP Services $http
 
ILIAS Refinery Factory $refinery
 
- Protected Attributes inherited from ilPageObjectGUI
ILIAS TestQuestionPool QuestionInfoService $questioninfo
 
ILIAS COPage Page PageManager $pm
 
ILIAS COPage Link LinkManager $link
 
ILIAS COPage InternalGUIService $gui
 
ILIAS COPage PC PCDefinition $pc_definition
 
ILIAS COPage Xsl XslManager $xsl
 
ILIAS COPage Editor GUIService $editor_gui
 
ILIAS Notes Service $notes
 
int $requested_ref_id
 
int $requested_pg_id
 
string $requested_file_id
 
string $requested_transl
 
int $requested_old_nr
 
EditGUIRequest $request
 
EditSessionRepository $edit_repo
 
string $exp_target_script = ""
 
string $exp_id = ""
 
string $exp_frame = ""
 
string $act_meth = ""
 
object $act_obj
 
int $notes_parent_id = 0
 
ilPropertyFormGUI $form
 
int $styleid = 0
 
bool $enabledpagefocus
 
string $link_xml
 
int $old_nr = 0
 
int $id
 
string $language
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTabsGUI $tabs_gui
 
ilAccessHandler $access
 
ilLogger $log
 
ilObjUser $user
 
ilHelpGUI $help
 
string $output_mode = ""
 
string $parent_type = ""
 
string $file_download_link = ''
 
string $fullscreen_link = ''
 
string $link_frame = ''
 
ILIAS GlobalScreen ScreenContext ContextServices $tool_context
 
ILIAS DI UIServices $ui
 
ILIAS COPage PageLinker $page_linker
 
string $abstract_pcid = ""
 
ilToolbarGUI $toolbar
 
string $open_place_holder = ""
 
int $requested_user_id = 0
 
int $requested_q_id = 0
 
int $requested_history_mode = 0
 
bool $enabled_news = false
 
int $news_obj_id = 0
 
string $news_obj_type = ""
 
array $tab_hook = null
 
string $view_page_link = ""
 
string $view_page_target = ""
 
string $offline_directory = ""
 
bool $notes_enabled = false
 
string $prependinghtml = ""
 
string $header = ""
 
string $int_link_return = ""
 
bool $enabled_href = true
 
int $adv_ref_id = null
 
string $adv_type = null
 
string $adv_subtype = null
 
string $concrete_lang = ""
 
string $profile_back_url = ""
 
ilComponentFactory $component_factory
 
ILIAS COPage Compare PageCompare $compare
 

Private Attributes

ilLocatorGUI $locator
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageObjectGUI
static getTinyMenu (string $a_par_type, bool $a_int_links=false, bool $a_wiki_links=false, bool $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true, $a_user_links=false, \ILIAS\COPage\Editor\Server\UIWrapper $ui_wrapper=null)
 Get Tiny Menu. More...
 
- Data Fields inherited from ilPageObjectGUI
const PRESENTATION = "presentation"
 
const EDIT = "edit"
 
const PREVIEW = "preview"
 
const OFFLINE = "offline"
 
const PRINTING = "print"
 
string $page_back_title = ""
 
ilPageObject $obj
 
string $presentation_title = ""
 
string $target_script = ""
 
string $return_location = ""
 
string $target_var = ""
 
string $template_output_var = ""
 
bool $output2template = false
 
string $link_params = ""
 
string $sourcecode_download_script = ""
 
bool $change_comments = false
 
bool $activation = false
 
bool $activated = true
 
bool $editpreview = false
 
bool $use_meta_data = false
 
ilObject $meta_data_rep_obj = null
 
int $meta_data_sub_obj_id = 0
 
string $meta_data_type = ""
 
object $meta_data_observer_obj = null
 
string $meta_data_observer_func = ""
 
bool $link_xml_set = false
 
bool $enableediting = true
 
bool $rawpagecontent = false
 
bool $enabledcontentincludes = false
 
bool $compare_mode = false
 
ilPageConfig $page_config = null
 
bool $tabs_enabled = true
 
bool $render_page_container = false
 
string $pl_start = "{{{{{"
 
string $pl_end = "}}}}}"
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilDclDetailedViewDefinitionGUI::__construct ( int  $tableview_id)

Definition at line 32 of file class.ilDclDetailedViewDefinitionGUI.php.

References $DIC, $ref_id, $tableview_id, ILIAS\MetaData\Repository\Validation\Data\__construct(), ilPageObject\_exists(), ilObject\_lookupObjectId(), ilObjStyleSheet\getContentStylePath(), ilObjStyleSheet\getSyntaxStylePath(), ILIAS\FileDelivery\http(), ILIAS\Repository\locator(), ILIAS\Repository\refinery(), and ilPageObjectGUI\setStyleId().

33  {
34  global $DIC;
35 
36  $this->tableview_id = $tableview_id;
37  $this->http = $DIC->http();
38  $this->refinery = $DIC->refinery();
39  $this->locator = $DIC['ilLocator'];
40 
41  $ref_id = $this->http->wrapper()->query()->retrieve('ref_id', $this->refinery->kindlyTo()->int());
42  $this->setStyleId($DIC->contentStyle()->domain()->styleForRefId($ref_id)->getEffectiveStyleId());
43 
44  // we always need a page object - create on demand
45  if (!ilPageObject::_exists('dclf', $tableview_id)) {
46  $viewdef = new ilDclDetailedViewDefinition();
47  $viewdef->setId($tableview_id);
48  $viewdef->setParentId(ilObject2::_lookupObjectId($ref_id));
49  $viewdef->setActive(false);
50  $viewdef->create();
51  }
52 
54 
55  // content style (using system defaults)
56  $this->tpl->setCurrentBlock("SyntaxStyle");
57  $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
58  $this->tpl->parseCurrentBlock();
59 
60  $this->tpl->setCurrentBlock("ContentStyle");
61  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
62  $this->tpl->parseCurrentBlock();
63  }
setStyleId(int $a_styleid)
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
static http()
Fetches the global http state from ILIAS.
__construct(VocabulariesInterface $vocabularies)
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
static _lookupObjectId(int $ref_id)
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
+ Here is the call graph for this function:

Member Function Documentation

◆ activate()

ilDclDetailedViewDefinitionGUI::activate ( )
protected

Definition at line 122 of file class.ilDclDetailedViewDefinitionGUI.php.

References ILIAS\Repository\ctrl(), and ilPageObjectGUI\getPageObject().

122  : void
123  {
124  $page = $this->getPageObject();
125  $page->setActive(true);
126  $page->update();
127  $this->ctrl->redirect($this, 'edit');
128  }
+ Here is the call graph for this function:

◆ cancelDelete()

ilDclDetailedViewDefinitionGUI::cancelDelete ( )

Definition at line 152 of file class.ilDclDetailedViewDefinitionGUI.php.

References ILIAS\Repository\ctrl().

152  : void
153  {
154  $this->ctrl->redirect($this, "edit");
155  }
+ Here is the call graph for this function:

◆ confirmDelete()

ilDclDetailedViewDefinitionGUI::confirmDelete ( )

Definition at line 138 of file class.ilDclDetailedViewDefinitionGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

138  : void
139  {
140  $conf = new ilConfirmationGUI();
141  $conf->setFormAction($this->ctrl->getFormAction($this));
142  $conf->setHeaderText($this->lng->txt('dcl_confirm_delete_detailed_view_title'));
143 
144  $conf->addItem('tableview', (string) $this->tableview_id, $this->lng->txt('dcl_confirm_delete_detailed_view_text'));
145 
146  $conf->setConfirm($this->lng->txt('delete'), 'deleteView');
147  $conf->setCancel($this->lng->txt('cancel'), 'cancelDelete');
148 
149  $this->tpl->setContent($conf->getHTML());
150  }
+ Here is the call graph for this function:

◆ deactivate()

ilDclDetailedViewDefinitionGUI::deactivate ( )
protected

Definition at line 130 of file class.ilDclDetailedViewDefinitionGUI.php.

References ILIAS\Repository\ctrl(), and ilPageObjectGUI\getPageObject().

130  : void
131  {
132  $page = $this->getPageObject();
133  $page->setActive(false);
134  $page->update();
135  $this->ctrl->redirect($this, 'edit');
136  }
+ Here is the call graph for this function:

◆ deleteView()

ilDclDetailedViewDefinitionGUI::deleteView ( )

Definition at line 157 of file class.ilDclDetailedViewDefinitionGUI.php.

References ILIAS\Repository\ctrl(), ilDclDetailedViewDefinition\exists(), and ILIAS\Repository\lng().

157  : void
158  {
159  if ($this->tableview_id && ilDclDetailedViewDefinition::exists($this->tableview_id)) {
160  $pageObject = new ilDclDetailedViewDefinition($this->tableview_id);
161  $pageObject->delete();
162  }
163 
164  $this->tpl->setOnScreenMessage('success', $this->lng->txt("dcl_empty_detailed_view_success"), true);
165  $this->ctrl->redirectByClass(self::class, "edit");
166  }
+ Here is the call graph for this function:

◆ executeCommand()

ilDclDetailedViewDefinitionGUI::executeCommand ( )

execute command

Definition at line 68 of file class.ilDclDetailedViewDefinitionGUI.php.

References ILIAS\Repository\ctrl(), ilPageObjectGUI\getPageObject(), ILIAS\Repository\lng(), ILIAS\Repository\locator(), and ilPageObjectGUI\setPresentationTitle().

68  : string
69  {
70  $next_class = $this->ctrl->getNextClass($this);
71 
72  $viewdef = $this->getPageObject();
73  $this->ctrl->setParameter($this, "dclv", $viewdef->getId());
74  $title = $this->lng->txt("dcl_view_viewdefinition");
75 
76  switch ($next_class) {
77  case "ilpageobjectgui":
78  throw new ilCOPageException("Deprecated. ilDclDetailedViewDefinitionGUI gui forwarding to ilpageobject");
79  default:
80  $this->setPresentationTitle($title);
81  $this->locator->addItem($title, $this->ctrl->getLinkTarget($this, "preview"));
82 
83  return parent::executeCommand();
84  }
85  }
setPresentationTitle(string $a_title="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ postOutputProcessing()

ilDclDetailedViewDefinitionGUI::postOutputProcessing ( string  $a_output)

Finalizing output processing.

Definition at line 171 of file class.ilDclDetailedViewDefinitionGUI.php.

References ilPageObjectGUI\EDIT, ilPageObjectGUI\getOutputMode(), ilPageObjectGUI\getPageObject(), and ilPageObjectGUI\PREVIEW.

171  : string
172  {
173  // You can use this to parse placeholders and the like before outputting
174 
175  if ($this->getOutputMode() == ilPageObjectGUI::PREVIEW) {
176  //page preview is not being used inside DataCollections - if you are here, something's probably wrong
177 
178  //
179  // // :TODO: find a suitable presentation for matched placeholders
180  // $allp = ilDataCollectionRecordViewViewdefinition::getAvailablePlaceholders($this->table_id, true);
181  // foreach ($allp as $id => $item) {
182  // $parsed_item = new ilTextInputGUI("", "fields[" . $item->getId() . "]");
183  // $parsed_item = $parsed_item->getToolbarHTML();
184  //
185  // $a_output = str_replace($id, $item->getTitle() . ": " . $parsed_item, $a_output);
186  // }
187  } // editor
188  else {
189  if ($this->getOutputMode() == ilPageObjectGUI::EDIT) {
190  $allp = $this->getPageObject()->getAvailablePlaceholders();
191 
192  // :TODO: find a suitable markup for matched placeholders
193  foreach ($allp as $item) {
194  $a_output = str_replace($item, "<span style=\"color:green\">" . $item . "</span>", $a_output);
195  }
196  }
197  }
198 
199  return $a_output;
200  }
+ Here is the call graph for this function:

◆ showPage()

ilDclDetailedViewDefinitionGUI::showPage ( )

Definition at line 87 of file class.ilDclDetailedViewDefinitionGUI.php.

References ILIAS\Repository\ctrl(), ilPageObjectGUI\EDIT, ilPageObjectGUI\getOutputMode(), ilPageObjectGUI\getPageObject(), ILIAS\Repository\lng(), ilPageObjectGUI\setPrependingHtml(), ILIAS\Repository\toolbar(), and ILIAS\Repository\ui().

87  : string
88  {
89  if ($this->getOutputMode() == ilPageObjectGUI::EDIT) {
90  $delete_button = $this->ui->factory()->button()->standard(
91  $this->lng->txt('dcl_empty_detailed_view'),
92  $this->ctrl->getLinkTarget($this, 'confirmDelete')
93  );
94  $this->toolbar->addComponent($delete_button);
95 
96  if ($this->getPageObject()->getActive()) {
97  $activation_button = $this->ui->factory()->button()->standard(
98  $this->lng->txt('dcl_deactivate_view'),
99  $this->ctrl->getLinkTarget($this, 'deactivate')
100  );
101  } else {
102  $activation_button = $this->ui->factory()->button()->standard(
103  $this->lng->txt('dcl_activate_view'),
104  $this->ctrl->getLinkTarget($this, 'activate')
105  );
106  }
107 
108  $this->toolbar->addComponent($activation_button);
109 
110  $legend = $this->getPageObject()->getAvailablePlaceholders();
111  if (sizeof($legend)) {
112  $this->setPrependingHtml(
113  "<span class=\"small\">" . $this->lng->txt("dcl_legend_placeholders") . ": " . implode(" ", $legend)
114  . "</span>"
115  );
116  }
117  }
118 
119  return parent::showPage();
120  }
setPrependingHtml(string $a_prependinghtml)
+ Here is the call graph for this function:

Field Documentation

◆ $http

ILIAS HTTP Services ilDclDetailedViewDefinitionGUI::$http
protected

Definition at line 29 of file class.ilDclDetailedViewDefinitionGUI.php.

◆ $locator

ilLocatorGUI ilDclDetailedViewDefinitionGUI::$locator
private

Definition at line 27 of file class.ilDclDetailedViewDefinitionGUI.php.

◆ $refinery

ILIAS Refinery Factory ilDclDetailedViewDefinitionGUI::$refinery
protected

Definition at line 30 of file class.ilDclDetailedViewDefinitionGUI.php.

◆ $tableview_id

int ilDclDetailedViewDefinitionGUI::$tableview_id
protected

Definition at line 28 of file class.ilDclDetailedViewDefinitionGUI.php.

Referenced by __construct().


The documentation for this class was generated from the following file: