ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 @access public. More...
 
 executeCommand ()
 execute command More...
 
 createObject ()
 create new object form More...
 
 save ($a_feed_block)
 save object @access public More...
 
 afterSave (ilObject $a_new_object, $a_feed_block=null)
 
 exitSave ()
 Exit save. More...
 
 update ($a_feed_block)
 update object @access public More...
 
 cancelUpdate ()
 Cancel update. More...
 
 afterUpdate ()
 After update. More...
 
 setTabs ()
 get tabs @access 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 @access 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 ()
 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...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. 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...
 

Protected Attributes

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

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...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access 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 @access public.

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

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 }
global $DIC
Definition: saml.php:7

References $DIC.

Member Function Documentation

◆ _goto()

static ilObjExternalFeedGUI::_goto (   $a_target)
static

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

232 {
233 global $DIC;
234
235 $tree = $DIC->repositoryTree();
236
237 $id = explode("_", $a_target);
238 $ref_id = $id[0];
239
240 // is sideblock: so show parent instead
241 $container_id = $tree->getParentId($ref_id);
242
243 // #14870
244 include_once "Services/Link/classes/class.ilLink.php";
245 ilUtil::redirect(ilLink::_getLink($container_id));
246 }
static redirect($a_script)
if(!array_key_exists('StateId', $_REQUEST)) $id

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

+ Here is the call graph for this function:

◆ afterSave()

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

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

120 {
121 if ($a_feed_block != null) {
122 // saveObject() parameters are sent as array
123 $a_feed_block = $a_feed_block[0];
124
125 $a_feed_block->setContextObjId($a_new_object->getId());
126 $a_feed_block->setContextObjType("feed");
127 }
128 }
getId()
get object id @access public

References ilObject\getId().

+ Here is the call graph for this function:

◆ afterUpdate()

ilObjExternalFeedGUI::afterUpdate ( )

After update.

Reimplemented from ilObjectGUI.

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

172 {
174
175 $par = $tree->getParentId($_GET["ref_id"]);
176 $_GET["ref_id"] = $par;
177 $this->redirectToRefId($par);
178 }
$_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...

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

+ Here is the call graph for this function:

◆ cancelUpdate()

ilObjExternalFeedGUI::cancelUpdate ( )

Cancel update.

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

159 {
161
162 $par = $tree->getParentId($_GET["ref_id"]);
163 $_GET["ref_id"] = $par;
164 $this->redirectToRefId($par);
165 }

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

+ Here is the call graph for this function:

◆ createObject()

ilObjExternalFeedGUI::createObject ( )

create new object form

@access public

Reimplemented from ilObjectGUI.

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

99 {
101 $ilCtrl->setCmdClass("ilexternalfeedblockgui");
102 $ilCtrl->setCmd("create");
103 return $this->executeCommand();
104 }
global $ilCtrl
Definition: ilias.php:18

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

+ Here is the call graph for this function:

◆ executeCommand()

ilObjExternalFeedGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

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

48 {
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 include_once("./Services/Block/classes/class.ilExternalFeedBlockGUI.php");
67 $fb_gui = new ilExternalFeedBlockGUI();
68 $fb_gui->setGuiObject($this);
69 if (is_object($this->object)) {
70 $fb_gui->setRefId($this->object->getRefId());
71 }
72 $ret = $this->ctrl->forwardCommand($fb_gui);
73 $tpl->setContent($ret);
74 break;
75
76 case "ilexportgui":
77 $this->prepareOutput();
78 $ilTabs->activateTab("export");
79 include_once("./Services/Export/classes/class.ilExportGUI.php");
80 $exp_gui = new ilExportGUI($this);
81 $exp_gui->addFormat("xml");
82 $ret = $this->ctrl->forwardCommand($exp_gui);
83// $this->tpl->show();
84 break;
85
86 default:
87 $cmd = $this->ctrl->getCmd("view");
88 if ($cmd != "create") {
89 $this->prepareOutput();
90 }
91 $cmd .= "Object";
92 $this->$cmd();
93 break;
94 }
95 return true;
96 }
Export User Interface Class.
BlockGUI class for external feed block.
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6

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

Referenced by createObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exitSave()

ilObjExternalFeedGUI::exitSave ( )

Exit save.

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

135 {
137
138 // always send a message
139 ilUtil::sendSuccess($this->lng->txt("object_added"), true);
140 $this->ctrl->returnToParent($this);
141 }

References ilObjectGUI\$ctrl, and $ilCtrl.

◆ save()

ilObjExternalFeedGUI::save (   $a_feed_block)

save object @access public

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

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

References $_POST.

◆ setTabs()

ilObjExternalFeedGUI::setTabs ( )

get tabs @access public

Reimplemented from ilObjectGUI.

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

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

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

◆ update()

ilObjExternalFeedGUI::update (   $a_feed_block)

update object @access public

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

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

References $_POST.

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: