public function createLinkObject($room) { $newLink = steam_factory::create_link($GLOBALS["STEAM"]->get_id(), $this->getRoom()); $newLink->move($room); $this->addLinkedLocation($room); return true; }
/** * function insert: * * @param mixed $pSteamObjects Array of steam_objects * @param integer $pType 0 = take originals, 1 = create links, 2 = take copies **/ public function insert($pSteamObjects, $pType = 0) { $objects_to_insert = array(); if (!is_array($pSteamObjects)) { $pSteamObjects = array(0 => $pSteamObjects); } if ($pType == 1) { foreach ($pSteamObjects as $steam_object) { steam_factory::create_link($this->steam_connectorID, $steam_object, 1); } $objects_to_insert = $this->steam_buffer_flush(); } elseif ($pType == 2) { foreach ($pSteamObjects as $steam_object) { steam_factory::create_copy($this->steam_connectorID, $steam_object, 1); } $objects_to_insert = $this->steam_buffer_flush(); } else { $objects_to_insert = $pSteamObjects; } foreach ($objects_to_insert as $object) { $steam_object = get_class($object) == "steam_request" ? $object->arguments : $object; $steam_object->move($this, 1); } return $this->steam_buffer_flush(); }
public function processData(\IRequestObject $requestObject) { $this->params = $requestObject->getParams(); $this->id = $this->params["id"]; $this->user = $GLOBALS["STEAM"]->get_current_steam_user(); $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id); $link = \steam_factory::create_link($GLOBALS["STEAM"]->get_id(), $object); $link->set_attributes(array(OBJ_DESC => $object->get_attribute(OBJ_DESC))); $link->move($this->user); }
public static function create($portfolio = null, $user = null) { $newInvite = steam_factory::create_link($GLOBALS["STEAM"]->get_id(), $name, ""); //TODO //$newInvite->move($portfolio); $newInvite->set_attribute(PORTFOLIO_PREFIX . "TYPE", "INVITE"); $newInvite->set_attribute("OBJ_TYPE", PORTFOLIO_PREFIX . "INVITE"); $newInvite = new Invite($newInvite); return $newInvite; }
public function processData(\IRequestObject $requestObject) { $this->params = $requestObject->getParams(); $this->id = $this->params["id"]; $this->user = $GLOBALS["STEAM"]->get_current_steam_user(); $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id); if ($object instanceof \steam_link) { $copy = \steam_factory::create_link($GLOBALS["STEAM"]->get_id(), $object->get_link_object()); } else { $copy = \steam_factory::create_copy($GLOBALS["STEAM"]->get_id(), $object); } $copy->move($this->user); }
public function processData(\IRequestObject $requestObject) { $this->params = $requestObject->getParams(); $this->id = $this->params["id"]; $this->user = $GLOBALS["STEAM"]->get_current_steam_user(); $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id); if (getObjectType($object) === "portal") { $portalInstance = \PortletTopic::getInstance(); $portalObjectId = $object->get_id(); \ExtensionMaster::getInstance()->callCommand("PortalCopy", "Portal", array("id" => $portalObjectId)); } else { if ($object instanceof \steam_link) { $copy = \steam_factory::create_link($GLOBALS["STEAM"]->get_id(), $object->get_link_object()); } else { $copy = \steam_factory::create_copy($GLOBALS["STEAM"]->get_id(), $object); } $copy->move($this->user); } }
public function processData(\IRequestObject $requestObject) { $this->params = $requestObject->getParams(); $this->id = $this->params["id"]; $bookmarks = $GLOBALS["STEAM"]->get_current_steam_user()->get_attribute(USER_BOOKMARKROOM); $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id); if ($object instanceof \steam_link) { $link = \steam_factory::create_link($GLOBALS["STEAM"]->get_id(), $object->get_link_object()); } else { if ($object instanceof \steam_docextern) { $link = \steam_factory::create_copy($GLOBALS["STEAM"]->get_id(), $object); } else { if ($object instanceof \steam_exit) { $link = \steam_factory::create_link($GLOBALS["STEAM"]->get_id(), $object->get_exit()); } else { $link = \steam_factory::create_link($GLOBALS["STEAM"]->get_id(), $object); } } } $link->set_attribute(OBJ_DESC, $object->get_attribute(OBJ_DESC)); $link->set_attribute(DOC_MIME_TYPE, $object->get_attribute(DOC_MIME_TYPE)); $link->move($bookmarks); }
public function create_entry($subject, $body, $category = "", $keywords = array(), $timestamp = "") { if (empty($timestamp)) { $timestamp = time(); } $data = array("DATE_TITLE" => $subject, "DATE_DESCRIPTION" => $body, "DATE_START_DATE" => $timestamp, "DATE_END_DATE" => $timestamp, "DATE_CATEGORY" => $category, "OBJ_KEYWORDS" => $keywords); // CREATE NEW ENTRY IN CALENDAR $date_object = $this->add_entry($data); $all_user = steam_factory::groupname_to_object($GLOBALS["STEAM"]->get_id(), STEAM_ALL_USER); // CREATE NEW LINK IN CATEGORY if (!empty($category)) { $link = steam_factory::create_link($GLOBALS["STEAM"]->get_id(), $date_object); $link->move($category); } // RETURN NEW DATE OBJECT return $date_object; }
foreach ($objects as $obj) { $link = steam_factory::create_link($steam, $obj); $link->set_attributes(array(OBJ_DESC => $obj->get_attribute(OBJ_DESC))); $link->move($steam->get_login_user()); } break; case "bookmark": //get object names foreach ($objects as $obj) { if ($obj instanceof steam_link) { $link = steam_factory::create_link($steam, $obj->get_link_object()); } else { if ($obj instanceof steam_docextern) { $link = steam_factory::create_copy($steam, $obj); } else { $link = steam_factory::create_link($steam, $obj); } } $link->set_attribute(OBJ_DESC, $obj->get_attribute(OBJ_DESC)); $link->set_attribute(DOC_MIME_TYPE, $obj->get_attribute(DOC_MIME_TYPE)); $link->move($steam->get_login_user()->get_attribute(USER_BOOKMARKROOM)); } break; case "drop": //move objects to current room $inventory = $steam->get_login_user()->get_inventory(); foreach ($inventory as $item) { if ($item->get_attribute("bid:portlet") === 0) { $item->move($object); steamUniqObjName($item); }
$trash = $steamUser->get_attribute(USER_TRASHBIN, 0); if (!$readable || !isset($portlet)) { die("Kopieren nicht möglich!<br>"); } //put copy into backpack if ($action == "copy") { include "{$config_doc_root}/modules/portal2/portlets/{$portlet_type}/copy.php"; $double = call_user_func("copy_{$portlet_type}", $steam, $portlet); $result = $double->move($steam->get_login_user()); // redirect to column_edit.php echo "<html><body onload='javascript:opener.top.location.reload();window.close();'></body></html"; $steam->disconnect(); exit; } else { if ($action == "reference") { $link = steam_factory::create_link($steam, $portlet); $link->set_attributes(array(OBJ_DESC => $portlet->get_attribute(OBJ_DESC), "bid:portlet" => $portlet->get_attribute("bid:portlet"))); $link->move($steam->get_login_user()); // redirect to column_edit.php echo "<html><body onload='javascript:opener.top.location.reload();window.close();'></body></html"; $steam->disconnect(); exit; } else { if ($action == "delete") { if (!$writable) { die("Entfernen nicht möglich!<br>"); } $portlet->delete(1); $steam->buffer_flush(); // redirect to column_edit.php echo "<html><body onload='javascript:opener.top.location.reload();window.close();'></body></html";