public function create_steam_structure($steam_connector, $name, $description, $env) { // CREATE CONTAINER FOR THIS WEBLOG $new_calendar = steam_factory::create_calendar($steam_connector->get_id(), $name, $env, $description); $new_calendar->set_attribute("OBJ_TYPE", "calendar_weblog_koala"); $all_user = steam_factory::groupname_to_object($steam_connector->get_id(), STEAM_ALL_USER); $new_calendar->set_read_access($all_user); // CREATE CONTAINER FOR CATEGORIES $categories = steam_factory::create_container($steam_connector->get_id(), "categories", $new_calendar, "all categories for this weblog"); // CREATE CONTAINER FOR BLOGROLL $blogroll = steam_factory::create_container($steam_connector->get_id(), "blogroll", $new_calendar, "blogroll for this weblog"); // CREATE CONTAINER FOR PODCASTING $blogroll = steam_factory::create_container($steam_connector->get_id(), "podspace", $new_calendar, "multimedia files for podcasting"); // convert calendar to weblog to match result $new_weblog = new steam_weblog($GLOBALS["STEAM"], $new_calendar->get_id()); return $new_weblog; }
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject) { $ajaxResponseObject->setStatus("ok"); $env_room = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id); $calendar = \steam_factory::create_room($GLOBALS["STEAM"]->get_id(), $this->params["name"], $env_room); $calendar->set_attribute("OBJ_TYPE", "calendar"); $steamCalendar = \steam_factory::create_calendar($GLOBALS["STEAM"]->get_id(), $this->params["name"] . "_calendar", null); $calendar->set_attribute("GROUP_CALENDAR", $steamCalendar); $steamCalendar->set_attribute("CALENDAR_OWNER", $calendar); $calendar->set_attribute("CALENDAR_SUBSCRIPTIONS", array()); $jswrapper = new \Widgets\JSWrapper(); $jswrapper->setJs(<<<END \t\tcloseDialog(); \t\tlocation.reload(); \t\t END ); $ajaxResponseObject->addWidget($jswrapper); return $ajaxResponseObject; }