4require_once 
'Services/Object/classes/class.ilObjectGUI.php';
 
    5require_once 
'Modules/Chatroom/classes/class.ilObjChatroom.php';
 
    6require_once 
'Modules/Chatroom/classes/class.ilChatroom.php';
 
    7require_once 
'Modules/Chatroom/classes/class.ilObjChatroomAccess.php';
 
    8require_once 
'Modules/Chatroom/classes/class.ilChatroomObjectGUI.php';
 
   24    public function __construct($a_data = 
null, $a_id = 
null, $a_call_by_reference = 
true)
 
   26        if (in_array($_REQUEST[
'cmd'], array(
'getOSDNotifications', 
'removeOSDNotifications'))) {
 
   27            require_once 
'Services/Notifications/classes/class.ilNotificationGUI.php';
 
   29            $notifications->{$_REQUEST[
'cmd'] . 
'Object'}();
 
   33        if ($a_data == 
null) {
 
   34            if (
$_GET[
'serverInquiry']) {
 
   35                require_once dirname(__FILE__) . 
'/class.ilChatroomServerHandler.php';
 
   43        $this->lng->loadLanguageModule(
'chatroom');
 
   44        $this->lng->loadLanguageModule(
'chatroom_adm');
 
   51    public static function _goto($params)
 
   55        $parts = explode(
'_', $params);
 
   61                $_REQUEST[
'sub'] = 
$_GET[
'sub'] = (int) $sub;
 
   65            $DIC->ctrl()->setParameterByClass(ilInfoScreenGUI::class, 
'ref_id', $ref_id);
 
   66            $DIC->ctrl()->redirectByClass(
 
   68                    ilRepositoryGUI::class,
 
   69                    ilObjChatroomGUI::class,
 
   70                    ilInfoScreenGUI::class
 
   97        $forms = parent::initCreationForms($a_new_type);
 
   99        $forms[self::CFORM_NEW]->clearCommandButtons();
 
  100        $forms[self::CFORM_NEW]->addCommandButton(
'create-save', $this->lng->txt($a_new_type . 
'_add'));
 
  101        $forms[self::CFORM_NEW]->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
 
  109        if (is_object($this->
object)) {
 
  110            $DIC[
'ilLocator']->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, 
'view'), 
'', $this->getRefId());
 
  120        return $this->
object->getRefId();
 
  139        if (
'cancel' == $this->ctrl->getCmd() && $this->getCreationMode()) {
 
  140            parent::cancelCreation();
 
  145        if (!$this->getCreationMode() && 
$DIC->access()->checkAccess(
'read', 
'', (
int) 
$_GET[
'ref_id'])) {
 
  146            $DIC[
'ilNavigationHistory']->addItem(
$_GET[
'ref_id'], 
'./goto.php?target=' . $this->type . 
'_' . 
$_GET[
'ref_id'], $this->type);
 
  149        $next_class = $this->ctrl->getNextClass();
 
  151        require_once 
'Modules/Chatroom/classes/class.ilChatroomTabGUIFactory.php';
 
  152        if (!$this->getCreationMode()) {
 
  155            if (strtolower(
$_GET[
'baseClass']) == 
'iladministrationgui') {
 
  156                $tabFactory->getAdminTabsForCommand($this->ctrl->getCmd());
 
  158                $DIC[
'ilHelp']->setScreenIdComponent(
"chtr");
 
  159                $tabFactory->getTabsForCommand($this->ctrl->getCmd());
 
  164        if ($next_class == 
'ilinfoscreengui' && $this->ctrl->getCmd() != 
'info') {
 
  165            $this->ctrl->setCmd(
'info-' . $this->ctrl->getCmd());
 
  168        if ($this->ctrl->getCmd() == 
'infoScreen') {
 
  169            $this->ctrl->setCmdClass(
'ilinfoscreengui');
 
  170            $this->ctrl->setCmd(
'info');
 
  173        switch ($next_class) {
 
  174            case "ilpropertyformgui":
 
  175                include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
  177                require_once 
'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
 
  179                $form = 
$factory->getClientSettingsForm();
 
  181                $this->ctrl->forwardCommand($form);
 
  183            case 'ilpermissiongui':
 
  184                include_once 
'Services/AccessControl/classes/class.ilPermissionGUI.php';
 
  185                $this->prepareOutput();
 
  187                $this->ctrl->forwardCommand($perm_gui);
 
  191                $this->prepareOutput();
 
  193                $GLOBALS[
'DIC']->tabs()->setTabActive(
'export');
 
  195                require_once 
'Services/Export/classes/class.ilExportGUI.php';
 
  197                $exp->addFormat(
'xml');
 
  198                $this->ctrl->forwardCommand($exp);
 
  201            case 'ilobjectcopygui':
 
  202                $this->prepareOutput();
 
  203                include_once 
'Services/Object/classes/class.ilObjectCopyGUI.php';
 
  205                $cp->setType(
'chtr');
 
  206                $this->ctrl->forwardCommand($cp);
 
  209            case "ilcommonactiondispatchergui":
 
  210                include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
 
  211                $this->prepareOutput();
 
  213                $this->ctrl->forwardCommand($gui);
 
  218                    $res = explode(
'-', $this->ctrl->getCmd(), 2);
 
  220                    if (!
$result && method_exists($this, $this->ctrl->getCmd() . 
'Object')) {
 
  221                        $this->prepareOutput();
 
  222                        $this->{$this->ctrl->getCmd() . 
'Object'}();
 
  224                } 
catch (Exception 
$e) {
 
  227                        'reason' => 
$e->getMessage()
 
  229                    echo json_encode($error);
 
  241        require_once 
'Modules/Chatroom/classes/class.ilChatroomServerConnector.php';
 
  242        require_once 
'Modules/Chatroom/classes/class.ilChatroomServerSettings.php';
 
  243        require_once 
'Modules/Chatroom/classes/class.ilChatroomAdmin.php';
 
  256        $this->prepareOutput();
 
  257        $this->tpl->setVariable(
'ADM_CONTENT', $this->lng->txt(
'invalid_operation'));
 
  265        $this->prepareOutput();
 
  275    public function insertObject()
 
  283        if (!
$DIC->rbac()->system()->checkAccess(
'create', 
$_GET[
'ref_id'], $new_type)) {
 
  284            $this->
ilias->raiseError(
 
  285                $this->lng->txt(
'no_create_permission'),
 
  286                $this->ilias->error_obj->MESSAGE
 
  293        $class_name = 
'ilObj' . 
$DIC[
'objDefinition']->getClassName($new_type);
 
  294        include_once 
$location . 
'/class.' . $class_name . 
'.php';
 
  299        $newObj = 
new $class_name();
 
  300        $newObj->setType($new_type);
 
  304        $newObj->createReference();
 
  305        $newObj->putInTree(
$_GET[
'ref_id']);
 
  306        $newObj->setPermissions(
$_GET[
'ref_id']);
 
  308        $objId = $newObj->getId();
 
  315                'autogen_usernames' => 
'Autogen #',
 
  316                'display_past_msgs' => 20,
 
  317                'private_rooms_enabled' => 0
 
  321        include_once 
'Services/AccessControl/classes/class.ilRbacLog.php';
 
  322        $rbac_log_roles = 
$DIC->rbac()->review()->getParentRoleIds($newObj->getRefId(), 
false);
 
  326        $this->
object = $newObj;
 
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
static getDefaultConfiguration()
Instantiates and returns ilChatroomAdmin object using instance_id and settings from settingsTable.
static getDefaultDefinition($moduleName)
Returns an Instance of ilChatroomObjectDefinition, using given $moduleName as parameter.
Class ilChatroomServerConnector.
Class ilChatroomServerHandler.
Class ilChatroomTabGUIFactory.
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Export User Interface Class.
Class ilObjChatroomGUI GUI class for chatroom objects.
executeCommand()
{execute command}
_forwards()
Returns an empty array.
__construct($a_data=null, $a_id=null, $a_call_by_reference=true)
{}
addLocatorItems()
should be overwritten to add object specific items (repository items are preloaded)
initCreationForms($a_new_type)
{Init creation froms.this will create the default creation forms: new, import, clonearray}
fallback()
Calls $this->prepareOutput method and sets template variable.
getObjectDefinition()
Returns object definition by calling getDefaultDefinition method in ilChatroomObjectDefinition.
settings()
Calls prepareOutput method.
static _goto($params)
Overwrites $_GET['ref_id'] with given $ref_id.
GUI class for the workflow of copying objects.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
redirection script todo: (a better solution should control the processing via a xml file)
foreach($_POST as $key=> $value) $res