本文整理汇总了PHP中steam_factory类的典型用法代码示例。如果您正苦于以下问题:PHP steam_factory类的具体用法?PHP steam_factory怎么用?PHP steam_factory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了steam_factory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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));
}
示例2: 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();
}
}
示例3: 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;
}
示例4: 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();
}
}
示例5: 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));
}
示例6: 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;
}
示例7: execute
public function execute(Request $request, Response $response)
{
$view = new TemplateView('lookUp');
$sessionRegistry = SessionRegistry::getInstance();
$registry = Registry::getInstance();
$view->assign('accessLevel', $sessionRegistry->get('accessLevel'));
$view->assign('groupList', $registry->get('ldapAccess')->getGroupsDN());
// Benutzeraktion:
if ($request->issetParameter('lookUp')) {
$groupname = $request->getParameter('directSelect');
$groupDN = $registry->get('ldapAccess')->getGroupDN_2($groupname);
$user = $sessionRegistry->get('uid');
$userPW = $sessionRegistry->get('userPW');
// sTeam
$steamConnector = new steam_connector('localhost', 1900, 'root', 'h6518_W#');
if (!$steamConnector->get_login_status()) {
$view->assign('status', 'warning');
$view->assign('statusMsg', 'Verbindung zum sTeam-Server konnte nicht erstellt werden!');
} else {
$ldapModule = $steamConnector->get_server_module('persistence:ldap');
$steam_groupname = $steamConnector->predefined_command($ldapModule, 'dn_to_group_name', $groupDN, 0);
$steamGroup = steam_factory::get_group($steamConnector, $steam_groupname, 0);
$steamGroup->get_members(0);
// Rückmeldung
$view->assign('status', 'ok');
$view->assign('statusMsg', 'LookUp wurde durchgeführt!');
}
}
// Ausgabe erzeugen.
$view->render($request, $response);
}
示例8: check_permissions
function check_permissions($user, $oid, $password)
{
$query = "select v from i_users where k='" . $user . "'";
$result = mysql_query($query);
$row = mysql_fetch_row($result);
$uid = $result[0];
// if we dont have uid we can get this from i_users
$query = "select v from i_security_cache where k='" . $oid . ":" . $uid . "'";
$result = mysql_query($query);
$row = mysql_fetch_row($result);
$permissions = $row[0];
// read permission is bit "1"
if (($permissions & 1) == 1) {
return 1;
} else {
$permission_denied = $permissions >> 16;
if (($permission_denied & 1) == 1) {
return 0;
} else {
$STEAM = new steam_connector(STEAM_SERVER, STEAM_PORT, $user, $password);
$document = steam_factory::get_object($STEAM->get_id(), (int) $oid, CLASS_OBJECT);
if ($document->check_access_read($STEAM->get_current_steam_user()) === 1) {
return 1;
}
}
}
return 0;
}
示例9: 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));
}
示例10: processData
public function processData(\IRequestObject $requestObject)
{
$params = $requestObject->getParams();
$objectId = $params["portletId"];
$appointmentObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId);
$terms = $appointmentObject->get_attribute("bid:portlet:content");
//get date
$currentDay = date("d") . "";
$currentMonth = date("m") . "";
$currentYear = date("Y") . "";
//new term parts
$description = "Beschreibung";
$endDate = array("day" => "", "month" => "", "year" => "");
$linkurl = "";
$location = "Ort";
$startDate = array("day" => $currentDay, "month" => $currentMonth, "year" => $currentYear);
$startTime = array("hour" => "12", "minutes" => "00");
$topic = "Neuer Termin";
//compose term
$newTerm = array("description" => $description, "end_date" => $endDate, "linkurl" => $linkurl, "location" => $location, "start_date" => $startDate, "start_time" => $startTime, "topic" => $topic);
if ($terms == "") {
$terms = array();
}
$terms[] = $newTerm;
$appointmentObject->set_attribute("bid:portlet:content", $terms);
}
示例11: 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;
}
示例12: 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;
}
示例13: test_groupname_to_object
function test_groupname_to_object()
{
$steam_group = steam_factory::groupname_to_object($GLOBALS["STEAM"]->get_id(), "steam");
$this->assertTrue(is_object($steam_group));
$this->assertTrue($steam_group instanceof steam_group);
$this->assertTrue($steam_group->get_name() === "sTeam");
}
示例14: processData
public function processData(\IRequestObject $requestObject)
{
$params = $requestObject->getParams();
$parentObjectId = $params["portletObjectId"];
$name = "Neue Meldung";
//check diffrent types of parameter
if (is_string($parentObjectId)) {
$portletObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $parentObjectId);
} else {
$portletObject = $parentObjectId;
}
$pName = "Neue Meldung";
$pContent = "Bitte geben Sie hier den Meldungstext ein.";
$pMimeType = "text/plain";
$pEnvironment = $portletObject;
//default is FALSE
$pDescription = "";
$messageObject = \steam_factory::create_document($GLOBALS["STEAM"]->get_id(), $pName, $pContent, $pMimeType, $pEnvironment, $pDescription);
$messageObject->set_attribute("bid:doctype", "portlet:msg");
$messageObject->set_attribute("bid:portlet:msg:link_open", "checked");
$messageObject->set_attribute("bid:portlet:msg:link_url", "");
$messageObject->set_attribute("bid:portlet:msg:link_url_label", "");
$messageObject->set_attribute("bid:portlet:msg:picture_alignment", "left");
$messageObject->set_attribute("bid:portlet:msg:picture_width", "");
$this->addMessageIdToPortlet($portletObject, $messageObject);
}
示例15: 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}";
}
}
}