ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDataCollectionRecordViewViewdefinitionGUI Class Reference

Class ilDataCollectionRecordViewViewdefinitionGUI. More...

+ Inheritance diagram for ilDataCollectionRecordViewViewdefinitionGUI:
+ Collaboration diagram for ilDataCollectionRecordViewViewdefinitionGUI:

Public Member Functions

 __construct ($table_id, $a_definition_id=0)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 showPage ()
 
 confirmDelete ()
 confirmDelete More...
 
 cancelDelete ()
 cancelDelete More...
 
 deleteView ()
 
 postOutputProcessing ($a_output)
 Finalizing output processing. More...
 
- Public Member Functions inherited from ilPageObjectGUI
 ilPageObjectGUI ($a_parent_type, $a_id, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="")
 Constructor. More...
 
 afterConstructor ()
 After constructor. More...
 
 setParentType ($a_val)
 Set parent type. More...
 
 getParentType ()
 Get parent type. More...
 
 setId ($a_val)
 Set ID. More...
 
 getId ()
 Get ID. More...
 
 setOldNr ($a_val)
 Set old nr (historic page) More...
 
 getOldNr ()
 Get old nr (historic page) More...
 
 setLanguage ($a_val)
 Set language. More...
 
 getLanguage ()
 Get language. More...
 
 setEnablePCType ($a_pc_type, $a_val)
 Set enable pc type. More...
 
 getEnablePCType ($a_pc_type)
 Get enable pc type. More...
 
 setPageConfig ($a_val)
 Set page config object. More...
 
 getPageConfig ()
 Get page config object. More...
 
 setBibId ($a_id)
 Set Bib Id. More...
 
 getBibId ()
 Get Bib Id. More...
 
 setPageObject ($a_pg_obj)
 Set Page Object. More...
 
 getPageObject ()
 Get Page Object. More...
 
 setOutputMode ($a_mode=IL_PAGE_PRESENTATION)
 Set Output Mode. More...
 
 getOutputMode ()
 
 setTemplateOutput ($a_output=true)
 
 outputToTemplate ()
 
 setPresentationTitle ($a_title="")
 
 getPresentationTitle ()
 
 setHeader ($a_title="")
 
 getHeader ()
 
 setLinkParams ($l_params="")
 
 getLinkParams ()
 
 setLinkFrame ($l_frame="")
 
 getLinkFrame ()
 
 setLinkXML ($link_xml)
 
 getLinkXML ()
 
 setQuestionXML ($question_xml)
 
 setQuestionHTML ($question_html)
 
 getQuestionXML ()
 
 getQuestionHTML ()
 
 setTemplateTargetVar ($a_variable)
 
 getTemplateTargetVar ()
 
 setTemplateOutputVar ($a_value)
 
 getTemplateOutputVar ()
 
 setSourcecodeDownloadScript ($script_name)
 
 getSourcecodeDownloadScript ()
 
 enableCitation ($a_enabled)
 
 isEnabledCitation ()
 
 setLocator (&$a_locator)
 
 setTabs ($a_tabs)
 
 setPageBackTitle ($a_title)
 
 setFileDownloadLink ($a_download_link)
 
 getFileDownloadLink ()
 
 setFullscreenLink ($a_fullscreen_link)
 
 getFullscreenLink ()
 
 setIntLinkReturn ($a_return)
 
 enableChangeComments ($a_enabled)
 
 isEnabledChangeComments ()
 
 enableNotes ($a_enabled, $a_parent_id)
 
 isEnabledNotes ()
 
 setOfflineDirectory ($offdir)
 set offline directory to offdir More...
 
 getOfflineDirectory ()
 get offline directory More...
 
 setViewPageLink ($a_link, $a_target="")
 set link for "view page" button More...
 
 getViewPageLink ()
 get view page link More...
 
 getViewPageTarget ()
 get view page target frame More...
 
 setActivationListener (&$a_obj, $a_meth)
 
 setEnabledNews ($a_enabled, $a_news_obj_id=0, $a_news_obj_type=0)
 Set enabled news. More...
 
 getEnabledNews ()
 Get enabled news. More...
 
 setTabHook ($a_object, $a_function)
 Set tab hook. More...
 
 setEditPreview ($a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 getEditPreview ()
 Get Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 setEnabledTabs ($a_enabledtabs)
 Set Output tabs. More...
 
 getEnabledTabs ()
 Get Output tabs. More...
 
 setEnabledPageFocus ($a_enabledpagefocus)
 Set Enable page focus. More...
 
 getEnabledPageFocus ()
 Get Enable page focus. More...
 
 setExplorerUpdater ($a_exp_frame, $a_exp_id, $a_exp_target_script)
 Set Explorer Updater. More...
 
 setPrependingHtml ($a_prependinghtml)
 Set Prepending HTML. More...
 
 getPrependingHtml ()
 Get Prepending HTML. More...
 
 setEnableEditing ($a_enableediting)
 Set Enable Editing. More...
 
 getEnableEditing ()
 Get Enable Editing. More...
 
 setRawPageContent ($a_rawpagecontent)
 Set Get raw page content only. More...
 
 getRawPageContent ()
 Get Get raw page content only. More...
 
 setStyleId ($a_styleid)
 Set Style Id. More...
 
 getStyleId ()
 Get Style Id. More...
 
 setCompareMode ($a_val)
 Set compare mode. More...
 
 getCompareMode ()
 Get compare mode. More...
 
 setAbstractOnly ($a_val)
 Set abstract only. More...
 
 getAbstractOnly ()
 Get abstract only. More...
 
 setRenderPageContainer ($a_val)
 Set render page container. More...
 
 getRenderPageContainer ()
 Get render page container. More...
 
 activateMetaDataEditor ($a_rep_obj_id, $a_sub_obj_id, $a_type, $a_observer_obj=NULL, $a_observer_func="")
 Activate meda data editor. More...
 
 determineFileDownloadLink ()
 Determine file download link. More...
 
 determineFullscreenLink ()
 Determine fullscreen link. More...
 
 determineSourcecodeDownloadScript ()
 Determine source code download script. More...
 
 getComponentPluginsXML ()
 Put information about activated plugins into XML. More...
 
executeCommand ()
 execute command More...
 
 setQEditTabs ($a_active)
 Set question editing tabs. More...
 
 onFeedbackEditingForwarding ()
 On feedback editing forwarding. More...
 
 deactivatePage ()
 
 activatePage ()
 
 showPage ()
 
 replaceCurlyBrackets ($output)
 Replace curly brackets. More...
 
 addActionsMenu ($a_tpl, $sel_media_mode, $sel_html_mode, $sel_js_mode)
 Add actions menu. More...
 
 addMultiLangActionsAndInfo ($a_list, $a_tpl)
 Add multi-language actions to menu. More...
 
 setEditMode ()
 Set edit mode. More...
 
 setDefaultLinkXml ()
 Set standard link xml. More...
 
 downloadFile ()
 Download file of file lists. More...
 
 displayMediaFullscreen ()
 Show media in fullscreen mode. More...
 
 displayMedia ($a_fullscreen=false)
 Display media. More...
 
 download_paragraph ()
 download source code paragraph More...
 
 insertContentIncludes ($a_html)
 Insert content includes. More...
 
 insertPageToc ($a_output)
 Insert page toc. More...
 
 insertResources ($a_output)
 Insert resources. More...
 
 insertAdvTrigger ($a_output)
 Insert adv content trigger. More...
 
 postOutputProcessing ($a_output)
 Finalizing output processing. More...
 
 insertHelp ($a_tpl)
 Insert help texts. More...
 
 preview ()
 preview More...
 
 edit ()
 edit ("view" before) More...
 
 insertJSAtPlaceholder ()
 InsertJS at placeholder. More...
 
 presentation ($a_mode=IL_PAGE_PRESENTATION)
 
 getHTML ()
 
 showMediaFullscreen ($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 ()
 Set screen id component. More...
 
 getTabs ($a_activate="")
 adds tabs to tab gui object More...
 
 compareVersion ()
 Compares two revisions of the page. More...
 
 replaceDiffTags ($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 ($a_content_object=null, $a_enable_private_notes=true, $a_enable_public_notes=false, $a_enable_notes_deletion=false, $a_callback=null)
 Get html for public and/or private notes. More...
 
 getQuestionJsOfPage ($a_no_interaction=false)
 Get question js. More...
 
 initSelfAssessmentRendering ($a_force_no_form=false)
 Init question handling. More...
 
 processAnswer ()
 Process answer. More...
 
 selfAssessmentRendering ($a_output)
 Self assessment question rendering. More...
 
 initialOpenedContent ()
 Initially opened content. More...
 
 initOpenedContentForm ()
 Init form for initially opened content. More...
 
 saveInitialOpenedContent ()
 Save initial opened content. More...
 
 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...
 

Protected Attributes

 $obj_id
 
 $table_id
 
- Protected Attributes inherited from ilPageObjectGUI
 $parent_type = ""
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageObjectGUI
static getTinyMenu ($a_par_type, $a_int_links=false, $a_wiki_links=false, $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true)
 Get Tiny Menu. More...
 
static addPreparationJavascript ($a_tpl, $a_lang)
 Add standard texts. More...
 
static getJSTextInitCode ($a_lang)
 Get js txt init code. More...
 
- Data Fields inherited from ilPageObjectGUI
 $tpl
 
 $lng
 
 $ctrl
 
 $obj
 
 $output_mode
 
 $presentation_title
 
 $target_script
 
 $return_location
 
 $target_var
 
 $template_output_var
 
 $output2template
 
 $link_params
 
 $bib_id
 
 $citation
 
 $sourcecode_download_script
 
 $change_comments
 
 $question_html
 
 $activation = false
 
 $activated = true
 
 $editpreview = false
 
 $use_meta_data = false
 
 $link_xml_set = false
 
 $enableediting = true
 
 $rawpagecontent = false
 
 $enabledcontentincludes = false
 
 $compare_mode = false
 
 $page_config = null
 
 $tabs_enabled = true
 
 $render_page_container = false
 
 $pl_start = "{{{{{"
 
 $pl_end = "}}}}}"
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilDataCollectionRecordViewViewdefinitionGUI::__construct (   $table_id,
  $a_definition_id = 0 
)

Constructor.

Parameters
object$a_parent_obj
int$table_id
int$a_definition_id

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

References $table_id, ilPageObjectGUI\$tpl, ilObjStyleSheet\getContentStylePath(), ilDataCollectionRecordViewViewdefinition\getIdByTableId(), ilPageObjectGUI\getPageObject(), and ilObjStyleSheet\getSyntaxStylePath().

31  {
32  global $tpl;
33 
34  //TODO Permission-Check
35  $this->table_id = $table_id;
36 
37  if(!$a_definition_id)
38  {
39  $a_definition_id = ilDataCollectionRecordViewViewdefinition::getIdByTableId($this->table_id);
40  }
41 
42  // we always need a page object - create on demand
43  if(!$a_definition_id)
44  {
46  $viewdef->setTableId($this->table_id);
47  $viewdef->create();
48  $a_definition_id = $viewdef->getId();
49  }
50 
51  parent::__construct("dclf", $a_definition_id);
52  $this->getPageObject()->setTableId($this->table_id);
53 
54 
55  // content style (using system defaults)
56  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
57 
58  $tpl->setCurrentBlock("SyntaxStyle");
59  $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
61  $tpl->parseCurrentBlock();
62 
63  $tpl->setCurrentBlock("ContentStyle");
64  $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
66  $tpl->parseCurrentBlock();
67 
68  }
static getIdByTableId($a_table_id)
Get view definition id by table id.
getPageObject()
Get Page Object.
getSyntaxStylePath()
get syntax style path
getContentStylePath($a_style_id)
get content style path
+ Here is the call graph for this function:

Member Function Documentation

◆ cancelDelete()

ilDataCollectionRecordViewViewdefinitionGUI::cancelDelete ( )

cancelDelete

Definition at line 146 of file class.ilDataCollectionRecordViewViewdefinitionGUI.php.

References $ilCtrl.

147  {
148  global $ilCtrl;
149 
150  $ilCtrl->redirect($this, "edit");
151  }
global $ilCtrl
Definition: ilias.php:18

◆ confirmDelete()

ilDataCollectionRecordViewViewdefinitionGUI::confirmDelete ( )

confirmDelete

Definition at line 126 of file class.ilDataCollectionRecordViewViewdefinitionGUI.php.

References $ilCtrl, ilPageObjectGUI\$lng, and ilPageObjectGUI\$tpl.

127  {
128  global $ilCtrl, $lng, $tpl;
129 
130  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
131  $conf = new ilConfirmationGUI();
132  $conf->setFormAction($ilCtrl->getFormAction($this));
133  $conf->setHeaderText($lng->txt('dcl_confirm_delete_view_title'));
134 
135  $conf->addItem('table', (int) $this->table_id, $lng->txt('dcl_confirm_delete_view_text'));
136 
137  $conf->setConfirm($lng->txt('delete'), 'deleteView');
138  $conf->setCancel($lng->txt('cancel'), 'cancelDelete');
139 
140  $tpl->setContent($conf->getHTML());
141  }
global $ilCtrl
Definition: ilias.php:18
Confirmation screen class.

◆ deleteView()

ilDataCollectionRecordViewViewdefinitionGUI::deleteView ( )

Definition at line 153 of file class.ilDataCollectionRecordViewViewdefinitionGUI.php.

References $ilCtrl, ilPageObjectGUI\$lng, $query, ilDataCollectionRecordViewViewdefinition\getIdByTableId(), and ilUtil\sendSuccess().

153  {
154  global $ilCtrl, $lng;
155 
156  if($this->table_id && ilDataCollectionRecordViewViewdefinition::getIdByTableId($this->table_id)){
157  global $ilDB;
159  include_once("./Modules/DataCollection/classes/class.ilDataCollectionRecordViewViewdefinition.php");
160  $pageObject = new ilDataCollectionRecordViewViewdefinition($id);
161  $pageObject->delete();
162 
163  $query = "DELETE FROM il_dcl_view WHERE table_id = ".$this->table_id." AND type = ".$ilDB->quote(0, "integer")." AND formtype = ".$ilDB->quote(0, "integer");
164  $ilDB->manipulate($query);
165  }
166 
167  ilUtil::sendSuccess($lng->txt("dcl_empty_view_success"), true);
168 
169  $ilCtrl->redirectByClass("ilDataCollectionFieldListGUI", "listFields");
170  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getIdByTableId($a_table_id)
Get view definition id by table id.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ executeCommand()

ilDataCollectionRecordViewViewdefinitionGUI::executeCommand ( )

execute command

Definition at line 73 of file class.ilDataCollectionRecordViewViewdefinitionGUI.php.

References $cmd, $ilCtrl, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, ilPageObjectGUI\getPageObject(), and ilPageObjectGUI\setPresentationTitle().

74  {
75  global $ilCtrl, $ilLocator, $tpl, $lng;
76 
77  $next_class = $ilCtrl->getNextClass($this);
78  $cmd = $ilCtrl->getCmd();
79 
80  $viewdef = $this->getPageObject();
81  if($viewdef)
82  {
83  $ilCtrl->setParameter($this, "dclv", $viewdef->getId());
84  $title = $lng->txt("dcl_view_viewdefinition");
85  }
86 
87  switch($next_class)
88  {
89  case "ilpageobjectgui":
90  die("Deprecated. ilDataCollectionRecordViewViewdefinitionGUI gui forwarding to ilpageobject");
91  return;
92 
93  default:
94  if($viewdef)
95  {
96  $this->setPresentationTitle($title);
97  // $tpl->setTitle($title);
98 
99  $ilLocator->addItem($title,
100  $ilCtrl->getLinkTarget($this, "preview"));
101  }
102  return parent::executeCommand();
103  }
104  }
getPageObject()
Get Page Object.
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18
setPresentationTitle($a_title="")
+ Here is the call graph for this function:

◆ postOutputProcessing()

ilDataCollectionRecordViewViewdefinitionGUI::postOutputProcessing (   $a_output)

Finalizing output processing.

Parameters
string$a_output
Returns
string

Definition at line 178 of file class.ilDataCollectionRecordViewViewdefinitionGUI.php.

References ilDataCollectionRecordViewViewdefinition\getAvailablePlaceholders(), ilPageObjectGUI\getOutputMode(), IL_PAGE_EDIT, and IL_PAGE_PREVIEW.

179  {
180  // You can use this to parse placeholders and the like before outputting
181 
182  // user view (IL_PAGE_PRESENTATION?)
183  if($this->getOutputMode() == IL_PAGE_PREVIEW)
184  {
185  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
186 
187  // :TODO: find a suitable presentation for matched placeholders
189  foreach($allp as $id => $item)
190  {
191  $parsed_item = new ilTextInputGUI("", "fields[".$item->getId()."]");
192  $parsed_item = $parsed_item->getToolbarHTML();
193 
194  $a_output = str_replace($id, $item->getTitle().": ".$parsed_item, $a_output);
195  }
196  }
197  // editor
198  else if($this->getOutputMode() == IL_PAGE_EDIT)
199  {
201 
202  // :TODO: find a suitable markup for matched placeholders
203  foreach($allp as $item)
204  {
205  $a_output = str_replace($item, "<span style=\"color:green\">".$item."</span>", $a_output);
206  }
207  }
208 
209  return $a_output;
210  }
const IL_PAGE_PREVIEW
This class represents a text property in a property form.
const IL_PAGE_EDIT
static getAvailablePlaceholders($a_table_id, $a_verbose=false)
Get all placeholders for table id.
+ Here is the call graph for this function:

◆ showPage()

ilDataCollectionRecordViewViewdefinitionGUI::showPage ( )

Definition at line 106 of file class.ilDataCollectionRecordViewViewdefinitionGUI.php.

References $ilCtrl, ilPageObjectGUI\$lng, ilDataCollectionRecordViewViewdefinition\getAvailablePlaceholders(), ilPageObjectGUI\getOutputMode(), IL_PAGE_EDIT, and ilPageObjectGUI\setPrependingHtml().

107  {
108  global $ilCtrl, $lng;
109  // :TODO: temporary legend of available placeholders
110  if($this->getOutputMode() == IL_PAGE_EDIT)
111  {
113  if(sizeof($legend))
114  {
115  $this->setPrependingHtml(" <form action=".$ilCtrl->getFormAction($this, "confirmDelete")." method='post'> <input class='submit' type='submit' value='".$lng->txt("dcl_empty_view")."'></form> <span class=\"small\">".$this->lng->txt("dcl_legend_placeholders").
116  ": ".implode(" ", $legend)."</span>");
117  }
118  }
119 
120  return parent::showPage();
121  }
global $ilCtrl
Definition: ilias.php:18
setPrependingHtml($a_prependinghtml)
Set Prepending HTML.
const IL_PAGE_EDIT
static getAvailablePlaceholders($a_table_id, $a_verbose=false)
Get all placeholders for table id.
+ Here is the call graph for this function:

Field Documentation

◆ $obj_id

ilDataCollectionRecordViewViewdefinitionGUI::$obj_id
protected

◆ $table_id

ilDataCollectionRecordViewViewdefinitionGUI::$table_id
protected

Definition at line 21 of file class.ilDataCollectionRecordViewViewdefinitionGUI.php.

Referenced by __construct().


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