本文整理汇总了PHP中steam_factory::create_room方法的典型用法代码示例。如果您正苦于以下问题:PHP steam_factory::create_room方法的具体用法?PHP steam_factory::create_room怎么用?PHP steam_factory::create_room使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类steam_factory
的用法示例。
在下文中一共展示了steam_factory::create_room方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public static function init()
{
$user = lms_steam::get_current_user();
$workroom = $user->get_workroom();
$portfolio_main_room = steam_factory::create_room($GLOBALS["STEAM"]->get_id(), "portfolio", $workroom, "room for portfolio module");
$artefacts_room = steam_factory::create_room($GLOBALS["STEAM"]->get_id(), "artefacts", $portfolio_main_room, "room for artefacts for portfolios");
$portfolios_room = steam_factory::create_room($GLOBALS["STEAM"]->get_id(), "portfolios", $portfolio_main_room, "room for portfolios");
}
示例2: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$user = $GLOBALS["STEAM"]->get_current_steam_user();
if (!isset($this->params["group_course"])) {
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml("Error: Kurs oder Gruppe auswählen");
$ajaxResponseObject->addWidget($rawWidget);
return $ajaxResponseObject;
}
if ($this->params["group_course"] == 1) {
if (!isset($this->params["course"])) {
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml("Error: Kurs oder Gruppe auswählen");
$ajaxResponseObject->addWidget($rawWidget);
return $ajaxResponseObject;
}
$course = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params["course"]);
$subgroups = $course->get_subgroups();
foreach ($subgroups as $subgroup) {
if ($subgroup->get_name() == "learners") {
$group = $subgroup;
}
if ($subgroup->get_name() == "staff") {
$staffgroup = $subgroup;
}
}
} else {
if (!isset($this->params["group"])) {
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml("Error: Kurs oder Gruppe auswählen");
$ajaxResponseObject->addWidget($rawWidget);
return $ajaxResponseObject;
}
$group = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params["group"]);
if ($this->params["group_admin"] == 0) {
$staffgroup = $user;
} else {
$staffgroup = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params["group_admin"]);
}
}
// create data structure and set access rights
$rapidfeedback = \steam_factory::create_room($GLOBALS["STEAM"]->get_id(), $this->params["title"], $group->get_workroom(), $this->params["desc"]);
$rapidfeedback->set_attribute("OBJ_TYPE", "RAPIDFEEDBACK_CONTAINER");
$rapidfeedback->set_attribute("RAPIDFEEDBACK_GROUP", $group);
$rapidfeedback->set_attribute("RAPIDFEEDBACK_STAFF", $staffgroup);
$rapidfeedback->set_attribute("RAPIDFEEDBACK_ADMIN_SURVEY", 1);
$rapidfeedback->set_sanction_all($group);
$rapidfeedback->set_sanction_all($staffgroup);
$ajaxResponseObject->setStatus("ok");
$jswrapper = new \Widgets\JSWrapper();
$jswrapper->setJs(<<<END
\t\tcloseDialog();
END
);
$ajaxResponseObject->addWidget($jswrapper);
return $ajaxResponseObject;
}
示例3: create
public static function create($name)
{
//Create Room
$newPortfolio = steam_factory::create_room($GLOBALS["STEAM"]->get_id(), $name, self::getPortfoliosContainer(), $name);
$newPortfolio->set_attribute(PORTFOLIO_PREFIX . "TYPE", "PORTFOLIO");
$newPortfolio->set_attribute("OBJ_TYPE", PORTFOLIO_PREFIX . "PORTFOLIO");
$newPortfolio = new PortfolioModel($newPortfolio);
//Create Forum
$newPortfolio->createForum();
//Create Groups
// $newPortfolio->createGroups();
return $newPortfolio;
}
示例4: getSchoolBookmarkFolderObject
public static function getSchoolBookmarkFolderObject()
{
$myuser = $GLOBALS["STEAM"]->get_current_steam_user();
$object = $myuser->get_attribute("USER_SCHOOLBOOKMARKROOM");
if (isset($object) && $object instanceof \steam_room && $object->get_attribute(OBJ_TYPE) === "container_schoolbookmarkroom") {
return $object;
} else {
$object = \steam_factory::create_room($GLOBALS["STEAM"]->get_id(), "Schoolbookmarkroom", null);
$object->set_attribute(OBJ_TYPE, "container_schoolbookmarkroom");
$myuser->set_attribute("USER_SCHOOLBOOKMARKROOM", $object);
return $object;
}
}
示例5: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$ajaxResponseObject->setStatus("ok");
$current_room = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
$portal = \steam_factory::create_room($GLOBALS["STEAM"]->get_id(), strip_tags($this->params["name"]), $current_room);
$jswrapper = new \Widgets\JSWrapper();
$jswrapper->setJs(<<<END
\t\tcloseDialog();
\t\tsendRequest("LoadBookmarks", {"id":"{$this->id}"}, "bookmarksWrapper", "updater", null, null, "bookmarks");
END
);
$ajaxResponseObject->addWidget($jswrapper);
return $ajaxResponseObject;
}
示例6: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$user = $GLOBALS["STEAM"]->get_current_steam_user();
$testObject = \steam_factory::create_room($GLOBALS["STEAM"]->get_id(), "Test Workflow2", $user->get_workroom());
$testObject->set_attribute("OBJ_TYPE", "WORKPLAN_CONTAINER");
$workplanExtension = \Workplan::getInstance();
$workplanExtension->addJS();
$content = $workplanExtension->loadTemplate("workplan_create.template.html");
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml("Test container wurde erstellt!");
$frameResponseObject->setTitle("Projektplan erstellen");
$frameResponseObject->addWidget($rawWidget);
return $frameResponseObject;
}
示例7: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$ajaxResponseObject->setStatus("ok");
$env_room = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
$gallery = \steam_factory::create_room($GLOBALS["STEAM"]->get_id(), $this->params["name"], $env_room);
$gallery->set_attribute("bid:collectiontype", "gallery");
$jswrapper = new \Widgets\JSWrapper();
$jswrapper->setJs(<<<END
\t\tcloseDialog();
\t\tlocation.reload();
\t\t
END
);
$ajaxResponseObject->addWidget($jswrapper);
return $ajaxResponseObject;
}
示例8: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$ajaxResponseObject->setStatus("ok");
$current_room = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
$wave = \steam_factory::create_room($GLOBALS["STEAM"]->get_id(), rawurlencode($this->params["title"]), $current_room, $this->params["title"]);
$wave->set_attribute("OBJ_TYPE", "container_waveside");
$wave->set_attribute("WAVE_SLOGAN", $this->params["slogan"]);
$jswrapper = new \Widgets\JSWrapper();
$jswrapper->setJs(<<<END
\t\tcloseDialog();
\t\tsendRequest("LoadContent", {"id":"{$this->id}"}, "explorerWrapper", "updater", null, null, "explorer");
END
);
$ajaxResponseObject->addWidget($jswrapper);
return $ajaxResponseObject;
}
示例9: createContainerObject
function createContainerObject($name, $env)
{
/* if (preg_match('/^(.*).wiki$/', $name)) {
$newName = preg_replace('/^(.*).wiki$/', '$1', $name);
$wiki = steam_factory::create_room($GLOBALS["STEAM"]->get_id(), $newName, $env);
$wiki->set_attribute("OBJ_TYPE", "container_wiki_koala");
//$user = \lms_steam::get_current_user();
//$koala_wiki = new \koala_wiki($wiki);
//$koala_wiki->set_access(PERMISSION_PRIVATE_READONLY, 0, 0, $user);
} elseif (preg_match('/^(.*).galerie$/', $name)) {
$newName = preg_replace('/^(.*).galerie$/', '$1', $name);
$gallery = steam_factory::create_room($GLOBALS["STEAM"]->get_id(), $newName, $env);
$gallery->set_attribute("bid:collectiontype", "gallery");
} else {*/
$newObject = steam_factory::create_room($GLOBALS["STEAM"]->get_id(), $name, $env);
return setObjectName($newObject, $name);
}
示例10: ajaxResponse
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;
}
示例11: checkActivity
private function checkActivity()
{
if (!$this->getRoom()->get_object_by_name(PORTFOLIO_PREFIX . "ACTIVITIES") instanceof steam_room) {
}
\steam_factory::create_room($GLOBALS["STEAM"]->get_id(), PORTFOLIO_PREFIX . "ACTIVITIES", $this->getRoom(), "Fertigkeiten");
}
示例12: get_documents_folder
protected function get_documents_folder($owner, $create = FALSE)
{
$workroom = $owner->get_workroom();
$docs = $workroom->get_object_by_name("documents");
if (is_object($docs) && $docs->get_attribute(OBJ_TYPE) === "room_documents_koala") {
return $docs;
} else {
if (!$create || !$workroom->check_access_insert(lms_steam::get_current_user())) {
return FALSE;
}
}
$docs = steam_factory::create_room($GLOBALS["STEAM"]->get_id(), "documents", $workroom);
if (!is_object($docs)) {
throw new Exception("Could not create documents folder for " . get_class($owner) . " : id " . $owner->get_id());
}
$docs->set_attribute(OBJ_TYPE, "room_documents_koala");
return $docs;
}
示例13: gettext
if (empty($problems)) {
$group_members = $grp;
$group_admins = 0;
$group_staff = 0;
// check if group is a course
$grouptype = (string) $grp->get_attribute("OBJ_TYPE");
if ($grouptype == "course") {
$group_staff = steam_factory::groupname_to_object($GLOBALS["STEAM"]->get_id(), $grp->get_groupname() . ".staff");
$group_admins = steam_factory::groupname_to_object($GLOBALS["STEAM"]->get_id(), $grp->get_groupname() . ".admins");
$group_members = steam_factory::groupname_to_object($GLOBALS["STEAM"]->get_id(), $grp->get_groupname() . ".learners");
$workroom = $group_members->get_workroom();
} else {
$workroom = $grp->get_workroom();
}
if (!isset($wiki_container) || !is_object($wiki_container)) {
$new_wiki = steam_factory::create_room($GLOBALS["STEAM"]->get_id(), $values["name"], $env, $values["dsc"]);
$new_wiki->set_attribute("OBJ_TYPE", "container_wiki_koala");
$_SESSION["confirmation"] = str_replace("%NAME", $values["name"], gettext("New wiki '%NAME' created."));
} else {
$wiki_container->set_attribute(OBJ_NAME, $values["name"]);
$wiki_container->set_attribute(OBJ_DESC, $values["dsc"]);
$portal->set_confirmation(gettext("The changes have been saved."));
$new_wiki = $wiki_container;
}
$koala_wiki = new lms_wiki($new_wiki);
$access = (int) $values["access"];
$access_descriptions = lms_wiki::get_access_descriptions($grp);
if (!$accessmergel) {
$koala_wiki->set_access($access, $access_descriptions[$access]["members"], $access_descriptions[$access]["steam"], $group_members, $group_staff, $group_admins);
}
$GLOBALS["STEAM"]->buffer_flush();
示例14: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$workplanExtension = \Workplan::getInstance();
$workplanExtension->addJS();
$user = $GLOBALS["STEAM"]->get_current_steam_user();
$portal = \lms_portal::get_instance();
$newWorkplan = FALSE;
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["new_workplan"])) {
$newWorkplan = TRUE;
$values = $_POST["values"];
$workplanContainer = \steam_factory::create_room($GLOBALS["STEAM"]->get_id(), $values["name"], $user->get_workroom());
$workplanContainer->set_attribute("OBJ_TYPE", "WORKPLAN_CONTAINER");
$xml = new \SimpleXMLElement("<workplan></workplan>");
$xml->addAttribute("name", $values["name"]);
$start = $values["start"];
$start = mktime(0, 0, 0, substr($start, 3, 2), substr($start, 0, 2), substr($start, 6, 4));
$workplanContainer->set_attribute("WORKPLAN_START", $start);
$xml->addAttribute("start", $start);
if (!empty($values["end"])) {
$end = $values["end"];
$end = mktime(0, 0, 0, substr($end, 3, 2), substr($end, 0, 2), substr($end, 6, 4));
$workplanContainer->set_attribute("WORKPLAN_END", $end);
$xml->addAttribute("end", $end);
} else {
$workplanContainer->set_attribute("WORKPLAN_END", -1);
$xml->addAttribute("end", -1);
}
if (!empty($values["description"])) {
$workplanContainer->set_attribute("WORKPLAN_DESCRIPTION", $values["description"]);
$xml->addAttribute("description", $values["description"]);
} else {
$workplanContainer->set_attribute("WORKPLAN_DESCRIPTION", "");
$xml->addAttribute("description", "");
}
\steam_factory::create_document($GLOBALS["STEAM"]->get_id(), "version.xml", $xml->saveXML(), "text/xml", $workplanContainer);
$portal->set_confirmation("Projektplan " . $values["name"] . " erfolgreich erstellt.");
}
if (!$newWorkplan) {
$workplanContainer = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params[0]);
}
if (is_object($workplanContainer) && $workplanContainer instanceof \steam_room) {
$content = $workplanExtension->loadTemplate("workplan_overview.template.html");
if (!$newWorkplan) {
$content->setCurrentBlock("BLOCK_CONFIRMATION");
$content->setVariable("CONFIRMATION_TEXT", "NONE");
$content->parse("BLOCK_CONFIRMATION");
}
// if current user has required rights display actionbar
if ($workplanContainer->get_creator()->get_id() == $user->get_id() || in_array("WORKPLAN_" . $user->get_id() . "_LEADER", $workplanContainer->get_attribute_names())) {
$content->setCurrentBlock("BLOCK_WORKPLAN_OVERVIEW_ACTIONBAR");
$content->setVariable("LABEL_CHANGE", "Eigenschaften bearbeiten");
$content->setVariable("LABEL_SNAPSHOT", "Snapshot erstellen");
$content->setVariable("WORKPLAN_ID", $workplanContainer->get_id());
if ($workplanContainer->get_creator()->get_id() == $user->get_id()) {
$content->setVariable("WORKPLAN_RIGHTS_CHANGE", "");
} else {
$content->setVariable("WORKPLAN_RIGHTS_CHANGE", "none");
}
$content->parse("BLOCK_WORKPLAN_OVERVIEW_ACTIONBAR");
}
$actionBar = new \Widgets\RawHtml();
$actionBar->setHtml($content->get());
$frameResponseObject->addWidget($actionBar);
$tabBar = new \Widgets\TabBar();
$tabBar->setTabs(array(array("name" => "Überblick", "link" => $this->getExtension()->getExtensionUrl() . "overview/" . $workplanContainer->get_id()), array("name" => "Tabelle", "link" => $this->getExtension()->getExtensionUrl() . "listView/" . $workplanContainer->get_id()), array("name" => "Gantt-Diagramm", "link" => $this->getExtension()->getExtensionUrl() . "ganttView/" . $workplanContainer->get_id()), array("name" => "Mitarbeiter", "link" => $this->getExtension()->getExtensionUrl() . "users/" . $workplanContainer->get_id()), array("name" => "Snapshots", "link" => $this->getExtension()->getExtensionUrl() . "snapshots/" . $workplanContainer->get_id())));
$tabBar->setActiveTab(0);
$frameResponseObject->addWidget($tabBar);
$content = $workplanExtension->loadTemplate("workplan_overview.template.html");
if (isset($_POST["edit"])) {
$edit = $_POST["edit"];
} else {
$edit = 0;
}
// if the user clicked on the edit symbol in Index-Command-View display edit view
if ($edit == 1) {
$content->setCurrentBlock("BLOCK_WORKPLAN_OVERVIEW_TABLE_EDIT");
$content->setVariable("WORKPLAN_OVERVIEW_EDIT", "Eigenschaften bearbeiten");
$content->setVariable("NAME_LABEL", "Projektname:*");
$content->setVariable("START_LABEL", "Beginn:*");
$content->setVariable("END_LABEL", "Ende:");
$content->setVariable("CREATOR_LABEL", "Projektersteller:");
$content->setVariable("DESCRIPTION_LABEL", "Beschreibung:");
$content->setVariable("NAME_VALUE", $workplanContainer->get_name());
$content->setVariable("START_VALUE", date("d.m.Y", (int) $workplanContainer->get_attribute("WORKPLAN_START")));
$content->setVariable("CREATOR_VALUE", $workplanContainer->get_creator()->get_full_name());
if ($workplanContainer->get_attribute("WORKPLAN_END") != -1) {
$content->setVariable("END_VALUE", date("d.m.Y", (int) $workplanContainer->get_attribute("WORKPLAN_END")));
}
if (in_array("WORKPLAN_DESCRIPTION", $workplanContainer->get_attribute_names())) {
$content->setVariable("DESCRIPTION_VALUE", $workplanContainer->get_attribute("WORKPLAN_DESCRIPTION"));
}
$content->setVariable("LABEL_SAVE", "Speichern");
$content->setVariable("LABEL_BACK", "Abbrechen");
$content->setVariable("WORKPLAN_ID", $workplanContainer->get_id());
$content->parse("BLOCK_WORKPLAN_OVERVIEW_TABLE_EDIT");
// else display normal view
} else {
$content->setCurrentBlock("BLOCK_WORKPLAN_OVERVIEW_TABLE");
$content->setVariable("WORKPLAN_OVERVIEW_ATTRIBUTE", "Eigenschaft");
$content->setVariable("WORKPLAN_OVERVIEW_VALUE", "Wert");
//.........这里部分代码省略.........
示例15: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$ajaxResponseObject->setStatus("ok");
if (!isset($this->params["group"])) {
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml("Error: Kurs oder Gruppe auswählen");
$ajaxResponseObject->addWidget($rawWidget);
return $ajaxResponseObject;
}
if ($this->params["group"] == 1) {
// course
if (!isset($this->params["course"])) {
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml("Error: Kurs oder Gruppe auswählen");
$ajaxResponseObject->addWidget($rawWidget);
return $ajaxResponseObject;
}
$course = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params["course"]);
$subgroups = $course->get_subgroups();
foreach ($subgroups as $subgroup) {
if ($subgroup->get_name() == "staff") {
$admingroup = $subgroup;
} else {
if ($subgroup->get_name() == "learners") {
$basegroup = $subgroup;
}
}
}
} else {
// group
if (!isset($this->params["basegroup"]) || !isset($this->params["admingroup"])) {
$rawWidget = new \Widgets\RawHtml();
$rawWidget->setHtml("Error: Kurs oder Gruppe auswählen");
$ajaxResponseObject->addWidget($rawWidget);
return $ajaxResponseObject;
}
$basegroup = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params["basegroup"]);
$admingroup = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params["admingroup"]);
}
$start = $this->params["startElements"];
$maxcol = intval(log($start, 2) + 1);
$pyramidRoom = \steam_factory::create_room($GLOBALS["STEAM"]->get_id(), $this->params["title"], $basegroup->get_workroom(), $this->params["title"]);
$pyramidRoom->set_sanction_all($admingroup);
$pyramidRoom->set_sanction_all($basegroup);
$pyramidRoom->set_attribute("OBJ_TYPE", "container_pyramiddiscussion");
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_ACTCOL", 0);
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_ADMINGROUP", $admingroup);
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_BASEGROUP", $basegroup);
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_DEADLINES", array());
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_EDITOR", $this->params["editor"]);
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_INITIALIZED", 1);
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_MAX", $start);
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_MAXCOL", $maxcol);
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_OVERRIDE_DEADLINES", 0);
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_USEDEADLINES", "no");
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_VERSION", "koala_3.0");
$participants = array();
$members = $basegroup->get_members();
$admins = $admingroup->get_members();
foreach ($admins as $admin) {
if (!$basegroup->is_member($admin) && $admin instanceof \steam_user) {
array_push($members, $admin);
}
}
foreach ($members as $member) {
if ($member instanceof \steam_user) {
$participants[$member->get_id()] = 0;
}
}
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_PARTICIPANT_MANAGEMENT", $participants);
$adminconfig = array();
foreach ($admins as $admin) {
if ($admin instanceof \steam_user) {
$options = array();
$options["show_adminoptions"] = "true";
$adminconfig[$admin->get_id()] = $options;
}
}
$pyramidRoom->set_attribute("PYRAMIDDISCUSSION_ADMINCONFIG", $adminconfig);
$pyramidGroup = \steam_factory::create_group($GLOBALS["STEAM"]->get_id(), "pyramid_" . $pyramidRoom->get_id(), $basegroup);
// create position documents and corresponding groups
$groups = array();
for ($count = 1; $count <= $maxcol; $count++) {
for ($count2 = 1; $count2 <= $start / pow(2, $count - 1); $count2++) {
$newGroup = \steam_factory::create_group($GLOBALS["STEAM"]->get_id(), "group_" . $count . "_" . $count2, $pyramidGroup);
$newGroup->set_insert_access($basegroup);
$newGroup->set_insert_access($admingroup);
$groups[$count . $count2] = $newGroup;
$newPosition = \steam_factory::create_document($GLOBALS["STEAM"]->get_id(), "Position_" . $count . "_" . $count2, "", $this->params["editor"], $pyramidRoom, "Position " . $count . "-" . $count2);
$newPosition->set_attribute("PYRAMIDDISCUSSION_COLUMN", $count);
$newPosition->set_attribute("PYRAMIDDISCUSSION_ROW", $count2);
$newPosition->set_attribute("PYRAMIDDISCUSSION_POS_READ_STATES", array());
$newPosition->set_attribute("PYRAMIDDISCUSSION_POS_TITLE", "");
$newPosition->set_attribute("PYRAMIDDISCUSSION_RELGROUP", $newGroup);
}
}
// generate group structure
for ($count = 2; $count <= $maxcol; $count++) {
for ($count2 = 1; $count2 <= $start / pow(2, $count - 1); $count2++) {
$groups[$count . $count2]->add_member($groups[$count - 1 . ($count2 * 2 - 1)]);
//.........这里部分代码省略.........