ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjMediaCastSettingsGUI Class Reference

Media Cast Settings. More...

+ Inheritance diagram for ilObjMediaCastSettingsGUI:
+ Collaboration diagram for ilObjMediaCastSettingsGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Contructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 editSettings ()
 Edit mediacast settings. More...
 
 saveSettings ()
 Save mediacast settings. More...
 
 cancel ()
 Save mediacast settings. 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 ()
 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...
 

Protected Member Functions

 initMediaCastSettings ()
 iniitialize settings storage for media cast More...
 
 initFormSettings ()
 Init settings property form. More...
 
- 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...
 
 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

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

Static Private Attributes

static $ERROR_MESSAGE
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Contructor.

public

Definition at line 55 of file class.ilObjMediaCastSettingsGUI.php.

References $DIC, and initMediaCastSettings().

56  {
57  global $DIC;
58 
59  $this->rbacsystem = $DIC->rbac()->system();
60  $this->error = $DIC["ilErr"];
61  $this->access = $DIC->access();
62  $this->ctrl = $DIC->ctrl();
63  $this->lng = $DIC->language();
64  $this->type = 'mcts';
65  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
66 
67  $this->lng->loadLanguageModule('mcst');
68  $this->initMediaCastSettings();
69  }
global $DIC
Definition: saml.php:7
initMediaCastSettings()
iniitialize settings storage for media cast
+ Here is the call graph for this function:

Member Function Documentation

◆ cancel()

ilObjMediaCastSettingsGUI::cancel ( )

Save mediacast settings.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

179  {
181 
182  $ilCtrl->redirect($this, "view");
183  }
global $ilCtrl
Definition: ilias.php:18

◆ editSettings()

ilObjMediaCastSettingsGUI::editSettings ( )

Edit mediacast settings.

Definition at line 143 of file class.ilObjMediaCastSettingsGUI.php.

References initFormSettings().

144  {
145  $this->tabs_gui->setTabActive('mcst_edit_settings');
146  $this->initFormSettings();
147  return true;
148  }
initFormSettings()
Init settings property form.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjMediaCastSettingsGUI::executeCommand ( )

Execute command.

public

Definition at line 77 of file class.ilObjMediaCastSettingsGUI.php.

References ilObjectGUI\$access, $error, ilObjectGUI\$ilErr, $rbacsystem, and ilObjectGUI\prepareOutput().

78  {
81  $ilAccess = $this->access;
82 
83  $next_class = $this->ctrl->getNextClass($this);
84  $cmd = $this->ctrl->getCmd();
85 
86  $this->prepareOutput();
87 
88  if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
89  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
90  }
91 
92  switch ($next_class) {
93  case 'ilpermissiongui':
94  $this->tabs_gui->setTabActive('perm_settings');
95  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
96  $perm_gui = new ilPermissionGUI($this);
97  $this->ctrl->forwardCommand($perm_gui);
98  break;
99 
100  default:
101  if (!$cmd || $cmd == 'view') {
102  $cmd = "editSettings";
103  }
104 
105  $this->$cmd();
106  break;
107  }
108  return true;
109  }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjMediaCastSettingsGUI::getAdminTabs ( )

Get tabs.

public

Definition at line 117 of file class.ilObjMediaCastSettingsGUI.php.

References ilObjectGUI\$access, $rbacsystem, and array.

118  {
120  $ilAccess = $this->access;
121 
122  if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
123  $this->tabs_gui->addTarget(
124  "mcst_edit_settings",
125  $this->ctrl->getLinkTarget($this, "editSettings"),
126  array("editSettings", "view")
127  );
128  }
129 
130  if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
131  $this->tabs_gui->addTarget(
132  "perm_settings",
133  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
134  array(),
135  'ilpermissiongui'
136  );
137  }
138  }
Create styles array
The data for the language used.

◆ initFormSettings()

ilObjMediaCastSettingsGUI::initFormSettings ( )
protected

Init settings property form.

protected

Definition at line 200 of file class.ilObjMediaCastSettingsGUI.php.

References ilObjectGUI\$access, $form, ilObjectGUI\$lng, $text, ilRadioOption\setInfo(), and settings().

Referenced by editSettings().

201  {
202  $lng = $this->lng;
203  $ilAccess = $this->access;
204  include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
205 
206  $form = new ilPropertyFormGUI();
207  $form->setFormAction($this->ctrl->getFormAction($this));
208  $form->setTitle($this->lng->txt('settings'));
209 
210  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
211  $form->addCommandButton('saveSettings', $this->lng->txt('save'));
212  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
213  }
214 
215  //Default Visibility
216  $radio_group = new ilRadioGroupInputGUI($lng->txt("mcst_default_visibility"), "defaultaccess");
217  $radio_option = new ilRadioOption($lng->txt("mcst_visibility_users"), "users");
218  $radio_group->addOption($radio_option);
219  $radio_option = new ilRadioOption($lng->txt("mcst_visibility_public"), "public");
220  $radio_group->addOption($radio_option);
221  $radio_group->setInfo($lng->txt("mcst_news_item_visibility_info"));
222  $radio_group->setRequired(false);
223  $radio_group->setValue($this->settings->getDefaultAccess());
224  #$ch->addSubItem($radio_group);
225  $form->addItem($radio_group);
226 
227 
228  foreach ($this->settings->getPurposeSuffixes() as $purpose => $filetypes) {
229  if ($purpose != "VideoAlternative") {
230  $text = new ilTextInputGUI($lng->txt("mcst_" . strtolower($purpose) . "_settings_title"), $purpose);
231  $text->setValue(implode(",", $filetypes));
232  $text->setInfo($lng->txt("mcst_" . strtolower($purpose) . "_settings_info"));
233  $form->addItem($text);
234  }
235  }
236 
237  $text = new ilTextAreaInputGUI($lng->txt("mcst_mimetypes"), "mimetypes");
238  $text->setInfo($lng->txt("mcst_mimetypes_info"));
239  $text->setCols(120);
240  $text->setRows(10);
241  if (is_array($this->settings->getMimeTypes())) {
242  $text->setValue(implode(",", $this->settings->getMimeTypes()));
243  }
244  $form->addItem($text);
245 
246  $this->tpl->setContent($form->getHTML());
247  }
This class represents an option in a radio group.
This class represents a property form user interface.
setInfo($a_info)
Set Info.
This class represents a property in a property form.
if(isset($_POST['submit'])) $form
$text
Definition: errorreport.php:18
This class represents a text property in a property form.
settings()
Definition: settings.php:2
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:

◆ initMediaCastSettings()

ilObjMediaCastSettingsGUI::initMediaCastSettings ( )
protected

iniitialize settings storage for media cast

Definition at line 189 of file class.ilObjMediaCastSettingsGUI.php.

References ilMediaCastSettings\_getInstance(), and settings().

Referenced by __construct().

190  {
191  include_once('Modules/MediaCast/classes/class.ilMediaCastSettings.php');
193  }
settings()
Definition: settings.php:2
static _getInstance()
get singleton instance
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveSettings()

ilObjMediaCastSettingsGUI::saveSettings ( )

Save mediacast settings.

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

References $_POST, ilObjectGUI\$access, ilObjectGUI\$ctrl, $ilCtrl, ilUtil\sendSuccess(), and settings().

154  {
156  $ilAccess = $this->access;
157 
158  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
159  foreach ($this->settings->getPurposeSuffixes() as $purpose => $filetypes) {
160  $purposeSuffixes[$purpose] = explode(",", preg_replace("/[^\w,]/", "", strtolower($_POST[$purpose])));
161  }
162 
163  $this->settings->setPurposeSuffixes($purposeSuffixes);
164  $this->settings->setDefaultAccess($_POST["defaultaccess"]);
165  $this->settings->setMimeTypes(explode(",", $_POST["mimetypes"]));
166 
167  $this->settings->save();
168 
169  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
170  }
171 
172  $ilCtrl->redirect($this, "view");
173  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
settings()
Definition: settings.php:2
$_POST["username"]
+ Here is the call graph for this function:

Field Documentation

◆ $error

ilObjMediaCastSettingsGUI::$error
protected

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

Referenced by executeCommand().

◆ $ERROR_MESSAGE

ilObjMediaCastSettingsGUI::$ERROR_MESSAGE
staticprivate

Definition at line 49 of file class.ilObjMediaCastSettingsGUI.php.

◆ $rbacsystem

ilObjMediaCastSettingsGUI::$rbacsystem
protected

Definition at line 42 of file class.ilObjMediaCastSettingsGUI.php.

Referenced by executeCommand(), and getAdminTabs().


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