ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjExternalFeedGUI Class Reference

Class ilObjExternalFeedGUI. More...

+ Inheritance diagram for ilObjExternalFeedGUI:
+ Collaboration diagram for ilObjExternalFeedGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor public. More...
 
 executeCommand ()
 
 createObject ()
 
 save ($a_feed_block)
 save object public More...
 
 afterSave (ilObject $a_new_object, $a_feed_block=null)
 
 exitSave ()
 Exit save. More...
 
 update ($a_feed_block)
 update object public More...
 
 cancelUpdate ()
 Cancel update. More...
 
 afterUpdate ()
 After update. More...
 
 setTabs ()
 get tabs public More...
 
- Public Member Functions inherited from ilObjectGUI
 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...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 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 ()
 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...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 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)
 
- 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...
 

Additional Inherited Members

- 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 Member Functions inherited from ilObjectGUI
 assignObject ()
 
 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...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) 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, $a_catch_errors=true)
 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...
 
 getTabs ()
 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 (ilColumnGUI $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...
 
- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjExternalFeedGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prepare_output = true 
)

Constructor public.

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

22  {
23  $this->type = "feed";
24  parent::__construct($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
25  }

Member Function Documentation

◆ _goto()

static ilObjExternalFeedGUI::_goto (   $a_target)
static

Definition at line 206 of file class.ilObjExternalFeedGUI.php.

References ilObjectGUI\$ref_id, ilObjectGUI\$tree, ilLink\_getLink(), and ilUtil\redirect().

207  {
208  global $tree;
209 
210  $id = explode("_", $a_target);
211  $ref_id = $id[0];
212 
213  // is sideblock: so show parent instead
214  $container_id = $tree->getParentId($ref_id);
215 
216  // #14870
217  include_once "Services/Link/classes/class.ilLink.php";
218  ilUtil::redirect(ilLink::_getLink($container_id));
219  }
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ afterSave()

ilObjExternalFeedGUI::afterSave ( ilObject  $a_new_object,
  $a_feed_block = null 
)

Definition at line 102 of file class.ilObjExternalFeedGUI.php.

References ilObject\getId().

103  {
104  if ($a_feed_block != null)
105  {
106  // saveObject() parameters are sent as array
107  $a_feed_block = $a_feed_block[0];
108 
109  $a_feed_block->setContextObjId($a_new_object->getId());
110  $a_feed_block->setContextObjType("feed");
111  }
112  }
getId()
get object id public
+ Here is the call graph for this function:

◆ afterUpdate()

ilObjExternalFeedGUI::afterUpdate ( )

After update.

Definition at line 155 of file class.ilObjExternalFeedGUI.php.

References $_GET, ilObjectGUI\$tree, and ilObjectGUI\redirectToRefId().

156  {
157  global $tree;
158 
159  $par = $tree->getParentId($_GET["ref_id"]);
160  $_GET["ref_id"] = $par;
161  $this->redirectToRefId($par);
162  }
$_GET["client_id"]
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 sav...
+ Here is the call graph for this function:

◆ cancelUpdate()

ilObjExternalFeedGUI::cancelUpdate ( )

Cancel update.

Definition at line 142 of file class.ilObjExternalFeedGUI.php.

References $_GET, ilObjectGUI\$tree, and ilObjectGUI\redirectToRefId().

143  {
144  global $tree;
145 
146  $par = $tree->getParentId($_GET["ref_id"]);
147  $_GET["ref_id"] = $par;
148  $this->redirectToRefId($par);
149  }
$_GET["client_id"]
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 sav...
+ Here is the call graph for this function:

◆ createObject()

ilObjExternalFeedGUI::createObject ( )

Definition at line 81 of file class.ilObjExternalFeedGUI.php.

References $ilCtrl, and executeCommand().

82  {
83  global $ilCtrl;
84  $ilCtrl->setCmdClass("ilexternalfeedblockgui");
85  $ilCtrl->setCmd("create");
86  return $this->executeCommand();
87  }
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ executeCommand()

ilObjExternalFeedGUI::executeCommand ( )

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

References $cmd, $ret, ilObjectGUI\$tpl, object, and ilObjectGUI\prepareOutput().

Referenced by createObject().

29  {
30  global $tpl, $ilTabs;
31 
32  $next_class = $this->ctrl->getNextClass($this);
33 
34  switch($next_class)
35  {
36  case 'ilpermissiongui':
37  $this->prepareOutput();
38  $ilTabs->activateTab("id_permissions");
39  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
40  $perm_gui = new ilPermissionGUI($this);
41  $ret = $this->ctrl->forwardCommand($perm_gui);
42  break;
43 
44  case "ilexternalfeedblockgui":
45  $this->prepareOutput();
46  $ilTabs->activateTab("id_settings");
47  include_once("./Services/Block/classes/class.ilExternalFeedBlockGUI.php");
48  $fb_gui = new ilExternalFeedBlockGUI();
49  $fb_gui->setGuiObject($this);
50  if (is_object($this->object))
51  {
52  $fb_gui->setRefId($this->object->getRefId());
53  }
54  $ret = $this->ctrl->forwardCommand($fb_gui);
55  $tpl->setContent($ret);
56  break;
57 
58  case "ilexportgui":
59  $this->prepareOutput();
60  $ilTabs->activateTab("export");
61  include_once("./Services/Export/classes/class.ilExportGUI.php");
62  $exp_gui = new ilExportGUI($this);
63  $exp_gui->addFormat("xml");
64  $ret = $this->ctrl->forwardCommand($exp_gui);
65 // $this->tpl->show();
66  break;
67 
68  default:
69  $cmd = $this->ctrl->getCmd("view");
70  if ($cmd != "create")
71  {
72  $this->prepareOutput();
73  }
74  $cmd .= "Object";
75  $this->$cmd();
76  break;
77  }
78  return true;
79  }
$cmd
Definition: sahs_server.php:35
Export User Interface Class.
prepareOutput($a_show_subobjects=true)
prepare output
BlockGUI class for external feed block.
Create new PHPExcel object
obj_idprivate
$ret
Definition: parser.php:6
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exitSave()

ilObjExternalFeedGUI::exitSave ( )

Exit save.

Definition at line 118 of file class.ilObjExternalFeedGUI.php.

References $ilCtrl, and ilUtil\sendSuccess().

119  {
120  global $ilCtrl;
121 
122  // always send a message
123  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
124  $this->ctrl->returnToParent($this);
125  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ save()

ilObjExternalFeedGUI::save (   $a_feed_block)

save object public

Definition at line 93 of file class.ilObjExternalFeedGUI.php.

References $_POST.

94  {
95  // create and insert forum in objecttree
96  $_REQUEST["new_type"] = "feed";
97  $_POST["title"] = $a_feed_block->getTitle();
98  $_POST["desc"] = $a_feed_block->getFeedUrl();
99  parent::saveObject($a_feed_block);
100  }
$_POST["username"]

◆ setTabs()

ilObjExternalFeedGUI::setTabs ( )

get tabs public

Definition at line 168 of file class.ilObjExternalFeedGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, and array.

169  {
170  global $ilAccess, $ilCtrl, $ilTabs, $lng, $ilHelp;
171 
172  if (in_array($ilCtrl->getCmd(), array("create", "saveFeedBlock")))
173  {
174  return;
175  }
176  $ilHelp->setScreenIdComponent("feed");
177 
178  $ilCtrl->setParameterByClass("ilexternalfeedblockgui", "external_feed_block_id",
179  $_GET["external_feed_block_id"]);
180  $ilCtrl->saveParameter($this, "external_feed_block_id");
181 
182  if ($ilAccess->checkAccess('write', '', $this->object->getRefId()))
183  {
184  $ilTabs->addTab("id_settings",
185  $lng->txt("settings"),
186  $this->ctrl->getLinkTargetByClass("ilexternalfeedblockgui", "editFeedBlock"));
187  }
188 
189  // export
190  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()) && DEVMODE == 1)
191  {
192  $ilTabs->addTab("export",
193  $lng->txt("export"),
194  $this->ctrl->getLinkTargetByClass("ilexportgui", ""));
195  }
196 
197 
198  if($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId()))
199  {
200  $ilTabs->addTab("id_permissions",
201  $lng->txt("perm_settings"),
202  $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm"));
203  }
204  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.

◆ update()

ilObjExternalFeedGUI::update (   $a_feed_block)

update object public

Definition at line 131 of file class.ilObjExternalFeedGUI.php.

References $_POST.

132  {
133  $_POST["title"] = $a_feed_block->getTitle();
134  $_POST["desc"] = $a_feed_block->getFeedUrl();
135  parent::updateObject();
136  }
$_POST["username"]

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