ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjectPluginGUI Class Reference
+ Inheritance diagram for ilObjectPluginGUI:
+ Collaboration diagram for ilObjectPluginGUI:

Public Member Functions

 __construct ($a_ref_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
executeCommand ()
 execute command More...
 
 addLocatorItems ()
 Add object to locator. More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initEditForm ()
 Init object update form. More...
 
 afterSave ($newObj)
 After saving public. More...
 
 getAfterCreationCmd ()
 Cmd that will be redirected to after creation of a new object. More...
 
 getStandardCmd ()
 
 addInfoTab ()
 Add info screen tab. More...
 
 addPermissionTab ()
 Add permission tab. More...
 
 infoScreen ()
 show information screen More...
 
 addInfoItems ($info)
 Add items to info screen. More...
 
- Public Member Functions inherited from ilObject2GUI
 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
executeCommand ()
 execute command More...
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode ($a_mode=true)
 
 getCreationMode ()
 
 isVisible ()
 
 trash ()
 
 undelete ()
 
 cancelDelete ()
 
 removeFromSystem ()
 
 cloneAll ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 Deleted in ilObject. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 Import. More...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

static _goto ($a_target)
 Goto redirection. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Protected Member Functions

 txt ($a_var)
 Wrapper for txt function. More...
 
 getCreationFormTitle ($a_form_type)
 Use custom creation form titles. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 Get access handler. More...
 
 setLocator ()
 set Locator More...
 
 deleteConfirmation ()
 Display delete confirmation form (workspace specific) More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 prepareOutput ()
 
 setTitleAndDescription ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings ($column_gui)
 
 checkPermission ($a_perm, $a_cmd="")
 
 showPossibleSubObjects ()
 
 redirectToRefId ()
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ()
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ()
 Deprecated functions. More...
 
 setReturnLocation ()
 
 showActions ()
 
 getTitlesByRefId ()
 
 getTabs ()
 
 __showButton ()
 
 hitsperpageObject ()
 
 __initTableGUI ()
 
 __setTableGUIBasicData ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Private Member Functions

 getPlugin ()
 Get plugin object. More...
 

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
 $tree
 
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 

Detailed Description

Definition at line 14 of file class.ilObjectPluginGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjectPluginGUI::__construct (   $a_ref_id = 0,
  $a_id_type = self::REPOSITORY_NODE_ID,
  $a_parent_node_id = 0 
)

Constructor.

Definition at line 19 of file class.ilObjectPluginGUI.php.

References ilPlugin\getPluginObject(), ilObject2GUI\getType(), IL_COMP_SERVICE, and ilPlugin\lookupNameForId().

20  {
21  parent::__construct($a_ref_id, $a_id_type, $a_parent_node_id);
22  $this->plugin =
23  ilPlugin::getPluginObject(IL_COMP_SERVICE, "Repository", "robj",
24  ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $this->getType()));
25  if (!is_object($this->plugin))
26  {
27  die("ilObjectPluginGUI: Could not instantiate plugin object for type ".$this->getType().".");
28  }
29  }
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get plugin object.
lookupNameForId($a_ctype, $a_cname, $a_slot_id, $a_plugin_id)
Lookup name for id.
getType()
Functions that must be overwritten.
const IL_COMP_SERVICE
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjectPluginGUI::_goto (   $a_target)
static

Goto redirection.

Definition at line 410 of file class.ilObjectPluginGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$ref_id, $t, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), and ilUtil\sendFailure().

411  {
412  global $ilCtrl, $ilAccess, $lng;
413 
414  $t = explode("_", $a_target[0]);
415  $ref_id = (int) $t[0];
416  $class_name = $a_target[1];
417 
418  if ($ilAccess->checkAccess("read", "", $ref_id))
419  {
420  $ilCtrl->initBaseClass("ilObjPluginDispatchGUI");
421  $ilCtrl->setTargetScript("ilias.php");
422  $ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI"));
423  $ilCtrl->setParameterByClass($class_name, "ref_id", $ref_id);
424  $ilCtrl->redirectByClass(array("ilobjplugindispatchgui", $class_name), "");
425  }
426  else if($ilAccess->checkAccess("visible", "", $ref_id))
427  {
428  $ilCtrl->initBaseClass("ilObjPluginDispatchGUI");
429  $ilCtrl->setTargetScript("ilias.php");
430  $ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI"));
431  $ilCtrl->setParameterByClass($class_name, "ref_id", $ref_id);
432  $ilCtrl->redirectByClass(array("ilobjplugindispatchgui", $class_name), "infoScreen");
433  }
434  else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
435  {
436  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
438  include_once("./Services/Object/classes/class.ilObjectGUI.php");
440  }
441  }
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
global $ilCtrl
Definition: ilias.php:18
static _lookupObjId($a_id)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ addInfoItems()

ilObjectPluginGUI::addInfoItems (   $info)

Add items to info screen.

Definition at line 403 of file class.ilObjectPluginGUI.php.

Referenced by infoScreen().

404  {
405  }
+ Here is the caller graph for this function:

◆ addInfoTab()

ilObjectPluginGUI::addInfoTab ( )

Add info screen tab.

Definition at line 344 of file class.ilObjectPluginGUI.php.

345  {
346  global $ilAccess, $ilTabs;
347 
348  // info screen
349  if ($ilAccess->checkAccess('visible', "", $this->object->getRefId()))
350  {
351  $ilTabs->addTarget("info_short",
352  $this->ctrl->getLinkTargetByClass(
353  "ilinfoscreengui", "showSummary"),
354  "showSummary");
355  }
356  }

◆ addLocatorItems()

ilObjectPluginGUI::addLocatorItems ( )

Add object to locator.

Definition at line 147 of file class.ilObjectPluginGUI.php.

References $_GET, ilObject2GUI\getCreationMode(), and getStandardCmd().

148  {
149  global $ilLocator;
150 
151  if (!$this->getCreationMode())
152  {
153  $ilLocator->addItem($this->object->getTitle(),
154  $this->ctrl->getLinkTarget($this, $this->getStandardCmd()), "", $_GET["ref_id"]);
155  }
156  }
$_GET["client_id"]
+ Here is the call graph for this function:

◆ addPermissionTab()

ilObjectPluginGUI::addPermissionTab ( )

Add permission tab.

Definition at line 361 of file class.ilObjectPluginGUI.php.

References $ilCtrl.

362  {
363  global $ilAccess, $ilTabs, $ilCtrl;
364 
365  // edit permissions
366  if($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId()))
367  {
368  $ilTabs->addTarget("perm_settings",
369  $ilCtrl->getLinkTargetByClass("ilpermissiongui", "perm"),
370  array("perm","info","owner"), 'ilpermissiongui');
371  }
372  }
global $ilCtrl
Definition: ilias.php:18

◆ afterSave()

ilObjectPluginGUI::afterSave (   $newObj)

After saving public.

Definition at line 313 of file class.ilObjectPluginGUI.php.

References $ilCtrl, getAfterCreationCmd(), getStandardCmd(), and ilUtil\sendSuccess().

314  {
315  global $ilCtrl;
316  // always send a message
317  ilUtil::sendSuccess($this->lng->txt("object_added"),true);
318 
319  $ilCtrl->initBaseClass("ilObjPluginDispatchGUI");
320  $ilCtrl->setTargetScript("ilias.php");
321  $ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI"));
322 
323 //var_dump($ilCtrl->call_node);
324 //var_dump($ilCtrl->forward);
325 //var_dump($ilCtrl->parent);
326 //var_dump($ilCtrl->root_class);
327 
328  $ilCtrl->setParameterByClass(get_class($this), "ref_id", $newObj->getRefId());
329  $ilCtrl->redirectByClass(array("ilobjplugindispatchgui", get_class($this)), $this->getAfterCreationCmd());
330  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
getAfterCreationCmd()
Cmd that will be redirected to after creation of a new object.
+ Here is the call graph for this function:

◆ executeCommand()

& ilObjectPluginGUI::executeCommand ( )

execute command

Definition at line 34 of file class.ilObjectPluginGUI.php.

References $_GET, $cmd, $ilCtrl, ilObjectGUI\$lng, $ret, ilObjectGUI\$tpl, ilObject\_getIcon(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject2GUI\addAdminLocatorItems(), ilObject2GUI\checkPermission(), ilObject2GUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getStandardCmd(), ilObject2GUI\getType(), infoScreen(), ilObjectGUI\setAdminTabs(), ilObject2GUI\setLocator(), ilObject2GUI\setTabs(), txt(), and ilObjectGUI\viewObject().

35  {
36  global $ilCtrl, $tpl, $ilAccess, $lng, $ilNavigationHistory, $ilTabs;
37 
38  // get standard template (includes main menu and general layout)
39  $tpl->getStandardTemplate();
40 
41  // set title
42  if (!$this->getCreationMode())
43  {
44  $tpl->setTitle($this->object->getTitle());
45  $tpl->setTitleIcon($this->plugin->getImagePath("icon_".$this->object->getType()."_b.png"),
46  $lng->txt("icon")." ".$this->txt("obj_".$this->object->getType()));
47 
48  // set tabs
49  if (strtolower($_GET["baseClass"]) != "iladministrationgui")
50  {
51  $this->setTabs();
52  $this->setLocator();
53  }
54  else
55  {
56  $this->addAdminLocatorItems();
57  $tpl->setLocator();
58  $this->setAdminTabs();
59  }
60 
61  // add entry to navigation history
62  if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
63  {
64  $ilNavigationHistory->addItem($_GET["ref_id"],
65  $ilCtrl->getLinkTarget($this, $this->getStandardCmd()), $this->getType());
66  }
67 
68  }
69  else
70  {
71  // show info of parent
72  $tpl->setTitle(ilObject::_lookupTitle(ilObject::_lookupObjId($_GET["ref_id"])));
73  $tpl->setTitleIcon(
75  $lng->txt("obj_".ilObject::_lookupType($_GET["ref_id"], true)));
76  $this->setLocator();
77 
78  }
79 
80  $next_class = $this->ctrl->getNextClass($this);
81  $cmd = $this->ctrl->getCmd();
82 
83  switch($next_class)
84  {
85  case "ilinfoscreengui":
86  $this->checkPermission("visible");
87  $this->infoScreen(); // forwards command
88  break;
89 
90  case 'ilpermissiongui':
91  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
92  $perm_gui = new ilPermissionGUI($this);
93  $ilTabs->setTabActive("perm_settings");
94  $ret = $ilCtrl->forwardCommand($perm_gui);
95  break;
96 
97  case 'ilobjectcopygui':
98  include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
99  $cp = new ilObjectCopyGUI($this);
100  $cp->setType($this->getType());
101  $this->ctrl->forwardCommand($cp);
102  break;
103  case 'ilcommonactiondispatchergui':
104  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
106  $this->ctrl->forwardCommand($gui);
107  break;
108  default:
109  if (strtolower($_GET["baseClass"]) == "iladministrationgui")
110  {
111  $this->viewObject();
112  return;
113  }
114  if(!$cmd)
115  {
116  $cmd = $this->getStandardCmd();
117  }
118  if ($cmd == "infoScreen")
119  {
120  $ilCtrl->setCmd("showSummary");
121  $ilCtrl->setCmdClass("ilinfoscreengui");
122  $this->infoScreen();
123  }
124  else
125  {
126  if ($this->getCreationMode())
127  {
128  $this->$cmd();
129  }
130  else
131  {
132  $this->performCommand($cmd);
133  }
134  }
135  break;
136  }
137 
138  if (!$this->getCreationMode())
139  {
140  $tpl->show();
141  }
142  }
setLocator()
set Locator
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
GUI class for the workflow of copying objects.
txt($a_var)
Wrapper for txt function.
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
static _lookupTitle($a_id)
lookup object title
viewObject()
list childs of current object
global $ilCtrl
Definition: ilias.php:18
checkPermission($a_perm, $a_cmd="")
getType()
Functions that must be overwritten.
static _lookupObjId($a_id)
setTabs()
create tabs (repository/workspace switch)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
infoScreen()
show information screen
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
setAdminTabs()
set admin tabs public
+ Here is the call graph for this function:

◆ getAfterCreationCmd()

ilObjectPluginGUI::getAfterCreationCmd ( )
abstract

Cmd that will be redirected to after creation of a new object.

Referenced by afterSave().

+ Here is the caller graph for this function:

◆ getCreationFormTitle()

ilObjectPluginGUI::getCreationFormTitle (   $a_form_type)
protected

Use custom creation form titles.

Parameters
string$a_form_type
Returns
string

Definition at line 182 of file class.ilObjectPluginGUI.php.

References ilObject2GUI\getType(), and txt().

183  {
184  switch($a_form_type)
185  {
186  case self::CFORM_NEW:
187  return $this->txt($this->getType()."_new");
188 
189  case self::CFORM_IMPORT:
190  return $this->lng->txt("import");
191 
192  case self::CFORM_CLONE:
193  return $this->txt("objs_".$this->getType()."_duplicate");
194  }
195  }
txt($a_var)
Wrapper for txt function.
getType()
Functions that must be overwritten.
+ Here is the call graph for this function:

◆ getPlugin()

ilObjectPluginGUI::getPlugin ( )
finalprivate

Get plugin object.

Returns
object plugin object

Definition at line 163 of file class.ilObjectPluginGUI.php.

Referenced by txt().

164  {
165  return $this->plugin;
166  }
+ Here is the caller graph for this function:

◆ getStandardCmd()

ilObjectPluginGUI::getStandardCmd ( )
abstract

Referenced by addLocatorItems(), afterSave(), and executeCommand().

+ Here is the caller graph for this function:

◆ infoScreen()

ilObjectPluginGUI::infoScreen ( )

show information screen

Definition at line 378 of file class.ilObjectPluginGUI.php.

References $ilCtrl, $ilUser, ilObjectGUI\$lng, $ret, ilObjectGUI\$tpl, addInfoItems(), and ilObject2GUI\checkPermission().

Referenced by executeCommand().

379  {
380  global $ilAccess, $ilUser, $lng, $ilCtrl, $tpl, $ilTabs;
381 
382  $ilTabs->setTabActive("info_short");
383 
384  $this->checkPermission("visible");
385 
386  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
387  $info = new ilInfoScreenGUI($this);
388  $info->enablePrivateNotes();
389 
390  // general information
391  $lng->loadLanguageModule("meta");
392 
393  $this->addInfoItems($info);
394 
395  // forward the command
396  $ret = $ilCtrl->forwardCommand($info);
397  //$tpl->setContent($ret);
398  }
Class ilInfoScreenGUI.
addInfoItems($info)
Add items to info screen.
global $ilCtrl
Definition: ilias.php:18
checkPermission($a_perm, $a_cmd="")
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCreateForm()

ilObjectPluginGUI::initCreateForm (   $a_new_type)

Init object creation form.

Parameters
string$a_new_type
Returns
ilPropertyFormGUI

Definition at line 222 of file class.ilObjectPluginGUI.php.

References ilTextAreaInputGUI\setCols(), ilTextInputGUI\setSize(), ilObject\TITLE_LENGTH, and txt().

Referenced by initCreationForms().

223  {
224  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
225  $form = new ilPropertyFormGUI();
226  $form->setTarget("_top");
227  $form->setFormAction($this->ctrl->getFormAction($this, "save"));
228  $form->setTitle($this->txt($a_new_type."_new"));
229 
230  // title
231  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
232  $ti->setSize(min(40, ilObject::TITLE_LENGTH));
233  $ti->setMaxLength(ilObject::TITLE_LENGTH);
234  $ti->setRequired(true);
235  $form->addItem($ti);
236 
237  // description
238  $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
239  $ta->setCols(40);
240  $ta->setRows(2);
241  $form->addItem($ta);
242 
243  $form->addCommandButton("save", $this->txt($a_new_type."_add"));
244  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
245 
246  return $form;
247  }
This class represents a property form user interface.
const TITLE_LENGTH
max length of object title
txt($a_var)
Wrapper for txt function.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCreationForms()

ilObjectPluginGUI::initCreationForms (   $a_new_type)
protected

Init creation froms.

this will create the default creation forms: new, import, clone

Parameters
string$a_new_type
Returns
array

Definition at line 205 of file class.ilObjectPluginGUI.php.

References ilObject2GUI\fillCloneTemplate(), and initCreateForm().

206  {
207  $forms = array(
208  self::CFORM_NEW => $this->initCreateForm($a_new_type),
209  // self::CFORM_IMPORT => $this->initImportForm($a_new_type),
210  self::CFORM_CLONE => $this->fillCloneTemplate(null, $a_new_type)
211  );
212 
213  return $forms;
214  }
fillCloneTemplate($a_tpl_varname, $a_type)
initCreateForm($a_new_type)
Init object creation form.
+ Here is the call graph for this function:

◆ initEditForm()

ilObjectPluginGUI::initEditForm ( )

Init object update form.

Returns
ilPropertyFormGUI

Definition at line 254 of file class.ilObjectPluginGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilTextAreaInputGUI\setCols(), ilTextInputGUI\setSize(), and ilObject\TITLE_LENGTH.

255  {
256  global $lng, $ilCtrl;
257 
258  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
259  $form = new ilPropertyFormGUI();
260  $form->setTarget("_top");
261  $form->setFormAction($ilCtrl->getFormAction($this, "update"));
262  $form->setTitle($lng->txt("edit"));
263 
264  // title
265  $ti = new ilTextInputGUI($lng->txt("title"), "title");
266  $ti->setSize(min(40, ilObject::TITLE_LENGTH));
267  $ti->setMaxLength(ilObject::TITLE_LENGTH);
268  $ti->setRequired(true);
269  $form->addItem($ti);
270 
271  // description
272  $ta = new ilTextAreaInputGUI($lng->txt("description"), "desc");
273  $ta->setCols(40);
274  $ta->setRows(2);
275  $form->addItem($ta);
276 
277  $form->addCommandButton("update", $lng->txt("save"));
278  // $this->form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
279 
280  return $form;
281  }
This class represents a property form user interface.
const TITLE_LENGTH
max length of object title
global $ilCtrl
Definition: ilias.php:18
setSize($a_size)
Set Size.
This class represents a text property in a property form.
This class represents a text area property in a property form.
+ Here is the call graph for this function:

◆ initImportForm()

ilObjectPluginGUI::initImportForm (   $a_new_type)
protected

Init object import form.

Parameters
stringnew type
Returns
ilPropertyFormGUI

Definition at line 289 of file class.ilObjectPluginGUI.php.

References ilFileInputGUI\setSuffixes().

290  {
291  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
292  $form = new ilPropertyFormGUI();
293  $form->setTarget("_top");
294  $form->setFormAction($this->ctrl->getFormAction($this, "importFile"));
295  $form->setTitle($this->lng->txt("import"));
296 
297  include_once("./Services/Form/classes/class.ilFileInputGUI.php");
298  $fi = new ilFileInputGUI($this->lng->txt("import_file"), "importfile");
299  $fi->setSuffixes(array("zip"));
300  $fi->setRequired(true);
301  $form->addItem($fi);
302 
303  $form->addCommandButton("importFile", $this->lng->txt("import"));
304  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
305 
306  return $form;
307  }
This class represents a property form user interface.
This class represents a file property in a property form.
setSuffixes($a_suffixes)
Set Accepted Suffixes.
+ Here is the call graph for this function:

◆ txt()

ilObjectPluginGUI::txt (   $a_var)
finalprotected

Wrapper for txt function.

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

References getPlugin().

Referenced by executeCommand(), getCreationFormTitle(), and initCreateForm().

172  {
173  return $this->getPlugin()->txt($a_var);
174  }
getPlugin()
Get plugin object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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