当前位置: 首页>>代码示例>>PHP>>正文


PHP steam_factory::create_link方法代码示例

本文整理汇总了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;
 }
开发者ID:rolwi,项目名称:koala,代码行数:7,代码来源:ArtefactModel.class.php

示例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();
 }
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:steam_container.class.php

示例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);
 }
开发者ID:rolwi,项目名称:koala,代码行数:10,代码来源:Reference.class.php

示例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;
 }
开发者ID:rolwi,项目名称:koala,代码行数:10,代码来源:Invite.class.php

示例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);
 }
开发者ID:rolwi,项目名称:koala,代码行数:13,代码来源:PortletCopy.class.php

示例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);
     }
 }
开发者ID:rolwi,项目名称:koala,代码行数:19,代码来源:Copy.class.php

示例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);
 }
开发者ID:rolwi,项目名称:koala,代码行数:23,代码来源:AddSchoolBookmark.class.php

示例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;
 }
开发者ID:rolwi,项目名称:koala,代码行数:17,代码来源:steam_weblog.class.php

示例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);
         }
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:bid_backpack.php

示例10: die

$trash = $steamUser->get_attribute(USER_TRASHBIN, 0);
if (!$readable || !isset($portlet)) {
    die("Kopieren nicht m&ouml;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&ouml;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";
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:portlet_edit.php


注:本文中的steam_factory::create_link方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。