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


PHP steam_factory::get_object方法代码示例

本文整理汇总了PHP中steam_factory::get_object方法的典型用法代码示例。如果您正苦于以下问题:PHP steam_factory::get_object方法的具体用法?PHP steam_factory::get_object怎么用?PHP steam_factory::get_object使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在steam_factory的用法示例。


在下文中一共展示了steam_factory::get_object方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getCommandByObjectId

 public function getCommandByObjectId(IdRequestObject $idRequestObject)
 {
     $object = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $idRequestObject->getId());
     if ($object instanceof steam_docextern) {
         return new \Explorer\Commands\ViewDocument();
     }
 }
开发者ID:rolwi,项目名称:koala,代码行数:7,代码来源:WebLinkObject.extension.php

示例2: frameResponse

 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $currentUser = $GLOBALS["STEAM"]->get_current_steam_user();
     if (isset($this->id)) {
         $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
         if ($object instanceof \steam_exit) {
             $object = $object->get_exit();
             $this->id = $object->get_id();
         }
     } else {
         $object = $currentUser->get_trashbin();
         $this->id = $object->get_id();
     }
     if ($object && $object instanceof \steam_container) {
         $objects = $object->get_inventory();
     } else {
         $objects = array();
     }
     $this->getExtension()->addJS();
     $this->getExtension()->addCSS();
     $title = "Papierkorb";
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Papierkorb leeren", "ajax" => array("onclick" => array("command" => "EmptyTrashbin", "params" => array("fromNameSpace" => "Trashbin"), "requestType" => "popup", "namespace" => "explorer")))));
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("trashbinWrapper");
     $loader->setMessage("Lade Daten ...");
     $loader->setCommand("loadContent");
     $loader->setParams(array("id" => $this->id));
     $loader->setElementId("trashbinWrapper");
     $loader->setType("updater");
     $frameResponseObject->setTitle($title);
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($loader);
     return $frameResponseObject;
 }
开发者ID:rolwi,项目名称:koala,代码行数:35,代码来源:Index.class.php

示例3: processData

 public function processData(\IRequestObject $requestObject)
 {
     $params = $requestObject->getParams();
     $objectId = $params["portletId"];
     $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId);
     $dialog = new \Widgets\Dialog();
     $dialog->setTitle("Bearbeiten von " . $object->get_attribute("OBJ_DESC"));
     $dialog->setPositionX($this->params["mouseX"]);
     $dialog->setPositionY($this->params["mouseY"]);
     $titelInput = new \Widgets\TextInput();
     $titelInput->setLabel("Überschrift");
     $titelInput->setData($object);
     //$titelInput->setContentProvider(\Widgets\DataProvider::attributeProvider("OBJ_DESC"));
     $titelInput->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([headline])"));
     $dialog->addWidget($titelInput);
     $dialog->addWidget(new \Widgets\Clearer());
     $align = new \Widgets\ComboBox();
     $align->setLabel("Ausrichtung");
     $align->setOptions(array(array("name" => "Linksbündig", "value" => "left"), array("name" => "Rechtsbündig", "value" => "right"), array("name" => "Zentriert", "value" => "center")));
     $align->setData($object);
     $align->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([alignment])"));
     $dialog->addWidget($align);
     $dialog->addWidget(new \Widgets\Clearer());
     $size = new \Widgets\ComboBox();
     $size->setLabel("Größe");
     $size->setOptions(array(array("name" => "15", "value" => "15"), array("name" => "20", "value" => "20"), array("name" => "25", "value" => "25"), array("name" => "30", "value" => "30"), array("name" => "35", "value" => "35"), array("name" => "40", "value" => "40"), array("name" => "50", "value" => "50"), array("name" => "60", "value" => "60")));
     $size->setData($object);
     $size->setContentProvider(\Widgets\DataProvider::attributeProvider("bid:portlet:content([size])"));
     $dialog->addWidget($size);
     $this->dialog = $dialog;
 }
开发者ID:rolwi,项目名称:koala,代码行数:31,代码来源:Edit.class.php

示例4: __construct

 private function __construct($objectId, $mySide)
 {
     $this->mySide = $mySide;
     $this->object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId);
     if (!$this->object || !$this->object instanceof \steam_container) {
         throw new Exception("Wave side not found.");
     }
     //$controlObject = \steam_factory::get_object_by_name($GLOBALS["STEAM"]->get_id(), $this->object->get_path() . "/control.xml");
     if (isset($controlObject) && $controlObject instanceof \steam_document) {
         $xmlStr = $controlObject->get_content();
         $xml = simplexml_load_string($xmlStr);
         $children = $xml->children();
         foreach ($children as $child) {
             if ($child->getName() == "OBJ_DESC") {
                 $this->object->set_attribute(OBJ_DESC, $child->asXML());
             } else {
                 if ($child->getName() == "steamweb_type") {
                     $this->object->set_attribute("WAVEPAGE_TYPE", $child->asXML());
                 } else {
                     if ($child->getName() == "steamweb_type_config") {
                         $subChildren = $child->children();
                         $map = XmlHelper::xml_to_array($subChildren[0]);
                         $this->object->set_attribute("WAVEPAGE_TYPE_CONFIG", $map[0]);
                     } else {
                         if ($child->getName() == "steamweb_module_ssp") {
                             $subChildren = $child->children();
                             $this->object->set_attribute("WAVEPAGE_MODULE_SSP_ALBUM_NO", $subChildren[0]->asXML());
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:rolwi,项目名称:koala,代码行数:34,代码来源:WavePage.class.php

示例5: processData

 public function processData(\IRequestObject $requestObject)
 {
     $params = $requestObject->getParams();
     $objectId = $params["portletId"];
     $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId);
     $dialog = new \Widgets\Dialog();
     $dialog->setTitle("Bearbeiten von " . $object->get_attribute("OBJ_DESC"));
     $termIndex = $params["termIndex"];
     $titelInput = new \Widgets\TextInput();
     $titelInput->setLabel("Titel");
     $titelInput->setData($object);
     $titelInput->setContentProvider(new AttributeDataProviderPortletAppointmentTerm($termIndex, "topic"));
     $dialog->addWidget($titelInput);
     $dialog->addWidget(new \Widgets\Clearer());
     $descriptionInput = new \Widgets\TextInput();
     $descriptionInput->setLabel("Beschreibung");
     $descriptionInput->setData($object);
     $descriptionInput->setContentProvider(new AttributeDataProviderPortletAppointmentTerm($termIndex, "description"));
     $dialog->addWidget($descriptionInput);
     $dialog->addWidget(new \Widgets\Clearer());
     $loactionInput = new \Widgets\TextInput();
     $loactionInput->setLabel("Ort");
     $loactionInput->setData($object);
     $loactionInput->setContentProvider(new AttributeDataProviderPortletAppointmentTerm($termIndex, "location"));
     $dialog->addWidget($loactionInput);
     $dialog->addWidget(new \Widgets\Clearer());
     //datepicker
     $datepickerStart = new \Widgets\DatePicker();
     $datepickerStart->setLabel("Startdatum");
     $datepickerStart->setData($object);
     $datepickerStart->setContentProvider(new AttributeDataProviderPortletAppointmentTerm($termIndex, "start_date"));
     $datepickerStart->setDatePicker(true);
     $datepickerStart->setTimePicker(false);
     $dialog->addWidget($datepickerStart);
     $dialog->addWidget(new \Widgets\Clearer());
     $timepickerStart = new \Widgets\DatePicker();
     $timepickerStart->setLabel("Startzeit");
     $timepickerStart->setData($object);
     $timepickerStart->setContentProvider(new AttributeDataProviderPortletAppointmentTerm($termIndex, "start_time"));
     $timepickerStart->setDatePicker(false);
     $timepickerStart->setTimePicker(true);
     $dialog->addWidget($timepickerStart);
     $dialog->addWidget(new \Widgets\Clearer());
     $datepickerEnd = new \Widgets\DatePicker();
     $datepickerEnd->setLabel("Enddatum");
     $datepickerEnd->setData($object);
     $datepickerEnd->setContentProvider(new AttributeDataProviderPortletAppointmentTerm($termIndex, "end_date"));
     $datepickerEnd->setDatePicker(true);
     $datepickerEnd->setTimePicker(false);
     $dialog->addWidget($datepickerEnd);
     $dialog->addWidget(new \Widgets\Clearer());
     //url
     $linkurlInput = new \Widgets\TextInput();
     $linkurlInput->setLabel("Link-Adresse");
     $linkurlInput->setData($object);
     $linkurlInput->setContentProvider(new AttributeDataProviderPortletAppointmentTerm($termIndex, "linkurl"));
     $dialog->addWidget($linkurlInput);
     $dialog->addWidget(new \Widgets\Clearer());
     $this->dialog = $dialog;
 }
开发者ID:rolwi,项目名称:koala,代码行数:60,代码来源:EditTerm.class.php

示例6: processData

 public function processData(\IRequestObject $requestObject)
 {
     $this->params = $requestObject->getParams();
     $this->id = $this->params["id"];
     $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
     $object->move($GLOBALS["STEAM"]->get_current_steam_user()->get_attribute(USER_TRASHBIN));
 }
开发者ID:rolwi,项目名称:koala,代码行数:7,代码来源:RemoveSchoolBookmark.class.php

示例7: copy_msg

function copy_msg($steam, $source)
{
    //create container
    $copy = steam_factory::create_container($steam, $source->get_attribute(OBJ_NAME), $steam->get_login_user());
    $copy->set_attribute("bid:doctype", "portlet");
    $copy->set_attribute("bid:portlet", "msg");
    //copy pictures if available
    $old_content = $source->get_attribute("bid:portlet:content");
    $copy_content = array();
    foreach ($old_content as $msg_id) {
        $message = steam_factory::get_object($steam, $msg_id);
        $new_message = steam_factory::create_copy($steam, $message);
        $new_message->move($copy);
        array_push($copy_content, $new_message->get_id());
        $picture_id = $message->get_attribute("bid:portlet:msg:picture_id");
        if ($picture_id != null || $picture_id != "") {
            //duplicate picture
            $new_picture = steam_factory::create_copy($steam, steam_factory::get_object($steam, $picture_id));
            $new_picture->move($copy);
            //update portlet content
            $new_message->set_attribute("bid:portlet:msg:picture_id", $new_picture->get_id());
        }
    }
    //set correct content
    $copy->set_attribute("bid:portlet:content", $copy_content);
    return $copy;
}
开发者ID:rolwi,项目名称:koala,代码行数:27,代码来源:copy.php

示例8: getData

 public function getData($object)
 {
     if (is_int($object)) {
         $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $id);
     }
     if ($object instanceof \steam_object) {
         $portletContent = $object->get_attribute("bid:portlet:content");
         $endDate = $portletContent["end_date"];
         $startDate = $portletContent["start_date"];
         switch ($this->field) {
             //end date
             /*
             case "end_day": 
             	return $endDate["day"];
             case "end_month": 
             	return $endDate["month"];
             case "end_year": 
             	return $endDate["year"];
             //start date
             case "start_year": 
             	return $startDate["year"];
             case "start_month": 
             	return $startDate["month"];
             case "start_day": 
             	return $startDate["day"];
             */
             case "start_date":
                 return $startDate["day"] . "." . $startDate["month"] . "." . $startDate["year"];
             case "end_date":
                 return $endDate["day"] . "." . $endDate["month"] . "." . $endDate["year"];
             default:
                 return "Error on field: {$this->field}";
         }
     }
 }
开发者ID:rolwi,项目名称:koala,代码行数:35,代码来源:AttributeDataProviderPortletTermplanDates.class.php

示例9: frameResponse

 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $portfolios = \PortfolioModel::getMyPortfolios();
     $listViewer = new \Widgets\ListViewer();
     if (isset($this->portfolioId)) {
         $portfolioObject = new \PortfolioModel(\steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->portfolioId));
     }
     if (isset($this->artefactId)) {
         $artefactObject = new \ArtefactModel(\steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->artefactId));
     }
     $steamUser = $GLOBALS["STEAM"]->get_current_steam_user();
     //		/** check the rights of the log-in user */
     //		$threadObject_allowed_read = $threadObject->check_access_read($steamUser);
     //		$threadObject_write = $threadObject->check_access_write($steamUser);
     //		$threadObject_annotate = $threadObject->check_access_annotate($steamUser);
     $listViewer->setHeadlineProvider(new HeadlineProviderDebug());
     $listViewer->setContentProvider(new ContentProviderDebug());
     if (isset($portfolioObject)) {
         $listViewer->setContent($artefacts);
     } else {
         $listViewer->setContent($portfolios);
     }
     $frameResponseObject->addWidget($listViewer);
     return $frameResponseObject;
 }
开发者ID:rolwi,项目名称:koala,代码行数:25,代码来源:Portfoliosdebug.class.php

示例10: processData

 public function processData(\IRequestObject $requestObject)
 {
     $params = $requestObject->getParams();
     $name = $params["title"];
     $column = $params["parent"];
     $version = "1.0";
     //check diffrent types of parameter
     if (is_string($column)) {
         $columnObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $column);
     } else {
         $columnObject = $column;
     }
     //get date
     $currentYear = date("Y") . "";
     $nextYear = date("Y") + 1 . "";
     //create
     $pollObject = \steam_factory::create_container($GLOBALS["STEAM"]->get_id(), $name, $columnObject);
     $pollTopic = "Beschreibung der Abstimmung";
     $startDate = array("day" => "01", "month" => "01", "year" => $currentYear);
     $endDate = array("day" => "01", "month" => "01", "year" => $nextYear);
     $options = array("Eintrag A", "Eintrag B", "Eintrag C", "Eintrag D", "Eintrag E", "Eintrag F");
     $optionsVotecount = array(0, 0, 0, 0, 0, 0);
     $pollContent = array("end_date" => $endDate, "options" => $options, "options_votecount" => $optionsVotecount, "poll_topic" => $pollTopic, "start_date" => $startDate);
     $pollObject->set_attributes(array(OBJ_DESC => $name, OBJ_TYPE => "container_portlet_bid", "bid:portlet" => "poll", "bid:portlet:version" => $version, "bid:portlet:content" => $pollContent));
 }
开发者ID:rolwi,项目名称:koala,代码行数:25,代码来源:Create.class.php

示例11: getCommandByObjectId

 public function getCommandByObjectId(IdRequestObject $idRequestObject)
 {
     $object = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $idRequestObject->getId());
     if ($object instanceof steam_link) {
         return new \Explorer\Commands\Index();
     }
 }
开发者ID:rolwi,项目名称:koala,代码行数:7,代码来源:LinkObject.extension.php

示例12: isChangeable

 public function isChangeable($object)
 {
     if (is_int($object)) {
         $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $object);
     }
     return !$object->is_locked($this->attribute) && $object->check_access_write($GLOBALS["STEAM"]->get_current_steam_user());
 }
开发者ID:rolwi,项目名称:koala,代码行数:7,代码来源:AttributeDataProvider.class.php

示例13: processData

 public function processData(\IRequestObject $requestObject)
 {
     $params = $requestObject->getParams();
     $name = $params["title"];
     $column = $params["parent"];
     $version = "3.0";
     //check diffrent types of parameter
     if (is_string($column)) {
         $columnObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $column);
     } else {
         $columnObject = $column;
     }
     //default values
     $descripton = "keine Beschreibung";
     $mediaType = "movie";
     //$url="http://www.bid-owl.de/download/347240/video.flv"; //test url
     $url = "";
     //create
     $media = \steam_factory::create_container($GLOBALS["STEAM"]->get_id(), $name, $columnObject);
     //$mediaType = "image";
     //$mediaType = "audio";
     $mediaType = "movie";
     $mediaContent = array("headline" => $name, "description" => $descripton, "media_type" => $mediaType, "url" => $url);
     $media->set_attributes(array(OBJ_DESC => $name, OBJ_TYPE => "container_portlet_bid", "bid:portlet" => "media", "bid:portlet:version" => $version, "bid:portlet:content" => $mediaContent));
 }
开发者ID:rolwi,项目名称:koala,代码行数:25,代码来源:Create.class.php

示例14: processData

 public function processData(\IRequestObject $requestObject)
 {
     //create portlet
     $params = $requestObject->getParams();
     $name = $params["title"];
     $column = $params["parent"];
     $version = "3.0";
     //check diffrent types of parameter
     if (is_string($column)) {
         $columnObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $column);
     } else {
         $columnObject = $column;
     }
     //default values
     $address = "http://api.flickr.com/services/feeds/photoset.gne?set=72157603709124069&nsid=12597119@N03&lang=de-de&format=rss_200";
     $address = "http://www.lehrer-online.de/rss-materialien.xml";
     $num_items = "5";
     $desc_length = "50";
     $style = "message";
     //Breit
     $style = "rss_feed";
     //Schmal
     $allow_html = "checked";
     //create object
     $portletObject = \steam_factory::create_container($GLOBALS["STEAM"]->get_id(), $name, $columnObject);
     $portletContent = array("address" => $address, "num_items" => $num_items, "desc_length" => $desc_length, "style" => $style, "allow_html" => $allow_html);
     $portletObject->set_attributes(array(OBJ_DESC => $name, OBJ_TYPE => "container_portlet_bid", "bid:portlet" => "rss", "bid:portlet:version" => $version, "bid:portlet:content" => $portletContent));
 }
开发者ID:rolwi,项目名称:koala,代码行数:28,代码来源:Create.class.php

示例15: processData

 public function processData(\IRequestObject $requestObject)
 {
     $this->params = $requestObject->getParams();
     $this->id = $this->params["id"];
     $this->direction = $this->params["direction"];
     $this->object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
     $environment = $this->object->get_environment();
     $inventory = $environment->get_inventory();
     foreach ($inventory as $key => $element) {
         if ($element->get_id() == $this->id) {
             $index = $key;
         }
     }
     if ($this->direction == "up") {
         $environment->swap_inventory($index, $index - 1);
     } else {
         if ($this->direction == "down") {
             $environment->swap_inventory($index, $index + 1);
         } else {
             if ($this->direction == "top") {
                 //$environment->swap_inventory($index, 0);
                 for ($i = 0; $i < $index; $i++) {
                     $environment->swap_inventory(0, $i);
                 }
             } else {
                 if ($this->direction == "bottom") {
                     //$environment->swap_inventory($index, count($inventory)-1);
                     for ($i = count($inventory) - 1; $i >= $index; $i--) {
                         $environment->swap_inventory($index, $i);
                     }
                 }
             }
         }
     }
 }
开发者ID:rolwi,项目名称:koala,代码行数:35,代码来源:Order.class.php


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