ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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...
 
 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...
 
 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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 

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...
 

Protected Attributes

 $tabs
 
 $help
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $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
 getObjectService ()
 Get object service. More...
 
 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...
 
 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...
 
 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...
 

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 31 of file class.ilObjExternalFeedGUI.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and help().

32  {
33  global $DIC;
34 
35  $this->tpl = $DIC["tpl"];
36  $this->tabs = $DIC->tabs();
37  $this->ctrl = $DIC->ctrl();
38  $this->tree = $DIC->repositoryTree();
39  $this->access = $DIC->access();
40  $this->lng = $DIC->language();
41  $this->help = $DIC["ilHelp"];
42  $this->type = "feed";
43  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
44  }
help()
Definition: help.php:2
__construct(Container $dic, ilPlugin $plugin)
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjExternalFeedGUI::_goto (   $a_target)
static

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

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

231  {
232  global $DIC;
233 
234  $tree = $DIC->repositoryTree();
235 
236  $id = explode("_", $a_target);
237  $ref_id = $id[0];
238 
239  // is sideblock: so show parent instead
240  $container_id = $tree->getParentId($ref_id);
241 
242  // #14870
243  include_once "Services/Link/classes/class.ilLink.php";
244  ilUtil::redirect(ilLink::_getLink($container_id));
245  }
$DIC
Definition: xapitoken.php:46
static redirect($a_script)
+ Here is the call graph for this function:

◆ afterSave()

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

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

References ilObject\getId().

119  {
120  if ($a_feed_block != null) {
121  // saveObject() parameters are sent as array
122  $a_feed_block = $a_feed_block[0];
123 
124  $a_feed_block->setContextObjId($a_new_object->getId());
125  $a_feed_block->setContextObjType("feed");
126  }
127  }
getId()
get object id public
+ Here is the call graph for this function:

◆ afterUpdate()

ilObjExternalFeedGUI::afterUpdate ( )

After update.

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

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

171  {
172  $tree = $this->tree;
173 
174  $par = $tree->getParentId($_GET["ref_id"]);
175  $_GET["ref_id"] = $par;
176  $this->redirectToRefId($par);
177  }
$_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 157 of file class.ilObjExternalFeedGUI.php.

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

158  {
159  $tree = $this->tree;
160 
161  $par = $tree->getParentId($_GET["ref_id"]);
162  $_GET["ref_id"] = $par;
163  $this->redirectToRefId($par);
164  }
$_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 97 of file class.ilObjExternalFeedGUI.php.

References ilObjectGUI\$ctrl, $ilCtrl, and executeCommand().

98  {
100  $ilCtrl->setCmdClass("ilexternalfeedblockgui");
101  $ilCtrl->setCmd("create");
102  return $this->executeCommand();
103  }
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ executeCommand()

ilObjExternalFeedGUI::executeCommand ( )

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

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

Referenced by createObject().

48  {
49  $tpl = $this->tpl;
50  $ilTabs = $this->tabs;
51 
52  $next_class = $this->ctrl->getNextClass($this);
53 
54  switch ($next_class) {
55  case 'ilpermissiongui':
56  $this->prepareOutput();
57  $ilTabs->activateTab("id_permissions");
58  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
59  $perm_gui = new ilPermissionGUI($this);
60  $ret = $this->ctrl->forwardCommand($perm_gui);
61  break;
62 
63  case "ilexternalfeedblockgui":
64  $this->prepareOutput();
65  $ilTabs->activateTab("id_settings");
66  $fb_gui = new ilExternalFeedBlockGUI();
67  $fb_gui->setGuiObject($this);
68  if (is_object($this->object)) {
69  $fb_gui->setRefId($this->object->getRefId());
70  }
71  $ret = $this->ctrl->forwardCommand($fb_gui);
72  $tpl->setContent($ret);
73  break;
74 
75  case "ilexportgui":
76  $this->prepareOutput();
77  $ilTabs->activateTab("export");
78  include_once("./Services/Export/classes/class.ilExportGUI.php");
79  $exp_gui = new ilExportGUI($this);
80  $exp_gui->addFormat("xml");
81  $ret = $this->ctrl->forwardCommand($exp_gui);
82 // $this->tpl->show();
83  break;
84 
85  default:
86  $cmd = $this->ctrl->getCmd("view");
87  if ($cmd != "create") {
88  $this->prepareOutput();
89  }
90  $cmd .= "Object";
91  $this->$cmd();
92  break;
93  }
94  return true;
95  }
Export User Interface Class.
prepareOutput($a_show_subobjects=true)
prepare output
BlockGUI class for external feed block.
$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 133 of file class.ilObjExternalFeedGUI.php.

References ilObjectGUI\$ctrl, and $ilCtrl.

134  {
136 
137  // always send a message
138  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
139  $this->ctrl->returnToParent($this);
140  }
global $ilCtrl
Definition: ilias.php:18

◆ save()

ilObjExternalFeedGUI::save (   $a_feed_block)

save object public

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

References $_POST.

110  {
111  // create and insert forum in objecttree
112  $_REQUEST["new_type"] = "feed";
113  $_POST["title"] = $a_feed_block->getTitle();
114  $_POST["desc"] = $a_feed_block->getFeedUrl();
115  parent::saveObject($a_feed_block);
116  }
$_POST["username"]

◆ setTabs()

ilObjExternalFeedGUI::setTabs ( )

get tabs public

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

References $_GET, ilObjectGUI\$access, ilObjectGUI\$ctrl, $help, $ilCtrl, ilObjectGUI\$lng, and $tabs.

184  {
185  $ilAccess = $this->access;
187  $ilTabs = $this->tabs;
188  $lng = $this->lng;
189  $ilHelp = $this->help;
190 
191  if (in_array($ilCtrl->getCmd(), array("create", "saveFeedBlock"))) {
192  return;
193  }
194  $ilHelp->setScreenIdComponent("feed");
195 
196  $ilCtrl->setParameterByClass(
197  "ilexternalfeedblockgui",
198  "external_feed_block_id",
199  $_GET["external_feed_block_id"]
200  );
201  $ilCtrl->saveParameter($this, "external_feed_block_id");
202 
203  if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
204  $ilTabs->addTab(
205  "id_settings",
206  $lng->txt("settings"),
207  $this->ctrl->getLinkTargetByClass("ilexternalfeedblockgui", "editFeedBlock")
208  );
209  }
210 
211  // export
212  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()) && DEVMODE == 1) {
213  $ilTabs->addTab(
214  "export",
215  $lng->txt("export"),
216  $this->ctrl->getLinkTargetByClass("ilexportgui", "")
217  );
218  }
219 
220 
221  if ($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId())) {
222  $ilTabs->addTab(
223  "id_permissions",
224  $lng->txt("perm_settings"),
225  $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm")
226  );
227  }
228  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ update()

ilObjExternalFeedGUI::update (   $a_feed_block)

update object public

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

References $_POST.

147  {
148  $_POST["title"] = $a_feed_block->getTitle();
149  $_POST["desc"] = $a_feed_block->getFeedUrl();
150  parent::updateObject();
151  }
$_POST["username"]

Field Documentation

◆ $help

ilObjExternalFeedGUI::$help
protected

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

Referenced by setTabs().

◆ $tabs

ilObjExternalFeedGUI::$tabs
protected

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

Referenced by executeCommand(), and setTabs().


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