本文整理汇总了PHP中steam_factory::create_link方法的典型用法代码示例。如果您正苦于以下问题:PHP steam_factory::create_link方法的具体用法?PHP steam_factory::create_link怎么用?PHP steam_factory::create_link使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类steam_factory
的用法示例。
在下文中一共展示了steam_factory::create_link方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createLinkObject
public function createLinkObject($room)
{
$newLink = steam_factory::create_link($GLOBALS["STEAM"]->get_id(), $this->getRoom());
$newLink->move($room);
$this->addLinkedLocation($room);
return true;
}
示例2: insert
/**
* 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();
}
示例3: processData
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);
}
示例4: create
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;
}
示例5: processData
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);
}
示例6: processData
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);
}
}
示例7: processData
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);
}
示例8: create_entry
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;
}
示例9: foreach
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);
}
示例10: die
$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";