本文整理汇总了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();
}
}
示例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;
}
示例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;
}
示例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());
}
}
}
}
}
}
}
示例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;
}
示例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));
}
示例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;
}
示例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}";
}
}
}
示例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;
}
示例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));
}
示例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();
}
}
示例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());
}
示例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));
}
示例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));
}
示例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);
}
}
}
}
}
}