本文整理汇总了PHP中FrameResponseObject::addWidget方法的典型用法代码示例。如果您正苦于以下问题:PHP FrameResponseObject::addWidget方法的具体用法?PHP FrameResponseObject::addWidget怎么用?PHP FrameResponseObject::addWidget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameResponseObject
的用法示例。
在下文中一共展示了FrameResponseObject::addWidget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
if (!$this->portfolioId) {
print "no object id given!";
exit;
}
$portfolio = \PortfolioModel::getById($this->portfolioId);
$loader = new \Widgets\Loader();
$loader->setWrapperId("artefactsWrapper");
$loader->setMessage("loading artefacts ...");
$loader->setCommand("loadArtefacts");
$loader->setParams(array($this->portfolioId));
$loader->setElementId("artefactsWrapper");
$loader->setType("updater");
$html .= <<<END
<script type="text/javascript">
\$(':checkbox').change(function() {
sendRequest("UpdateSelectedArtefacts", {"artefactId": "{$this->artefactId}", "portfolio": "{$this->portfolioId}", "checked": \$(this).prop("checked")}, "", "data");
});
</script>
END;
$rawHtml = new \Widgets\RawHtml();
$rawHtml->setHtml($html);
$frameResponseObject->addWidget($rawHtml);
$frameResponseObject->addWidget($loader);
return $frameResponseObject;
}
示例2: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$actionBar = new \Widgets\ActionBar();
$actionBar->setActions(array(array("name" => \Portfolio::getInstance()->getText("new"), "ajax" => array("onclick" => array("command" => "newArtefact", "params" => array(), "requestType" => "popup")))));
$breadcrumb = new \Widgets\Breadcrumb();
$breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Manage Portfolios"))));
$tabBar = new \Widgets\TabBar();
$tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => \Portfolio::getInstance()->getText("Portfolio"), "link" => $this->getExtension()->getExtensionUrl() . "MyPortfolio/"), array("name" => \Portfolio::getInstance()->getText("Shared Portfolios"), "link" => $this->getExtension()->getExtensionUrl() . "SharedProfiles/")));
$tabBar->setActiveTab(1);
$clearer = new \Widgets\Clearer();
$loader = new \Widgets\Loader();
$loader->setWrapperId("portfoliosWrapper");
$loader->setMessage("loading portfolios ...");
$loader->setCommand("loadPortfolios");
$loader->setParams(array());
$loader->setElementId("portfoliosWrapper");
$loader->setType("updater");
$frameResponseObject->setTitle("Manage Portfolios");
$frameResponseObject->addWidget($actionBar);
$frameResponseObject->addWidget($breadcrumb);
$frameResponseObject->addWidget($tabBar);
$frameResponseObject->addWidget($clearer);
$frameResponseObject->addWidget($loader);
//$frameResponseObject->addWidget($rawHtml);
return $frameResponseObject;
}
示例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: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$portfolio = \PortfolioModel::getById($this->portfolioId);
$actionBar = new \Widgets\ActionBar();
$actionBar->setActions(array(array("link" => "javascript:history.back()", "name" => "zurück"), array("name" => \Portfolio::getInstance()->getText("new"), "ajax" => array("onclick" => array("command" => "newArtefact", "params" => array(), "requestType" => "popup")))));
$breadcrumb = new \Widgets\Breadcrumb();
$breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Belege des Portfolios »" . $portfolio->getName() . "«"))));
$tabBar = new \Widgets\TabBar();
$tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => \Portfolio::getInstance()->getText("Portfolio"), "link" => $this->getExtension()->getExtensionUrl() . "MyPortfolio/"), array("name" => \Portfolio::getInstance()->getText("Shared Portfolios"), "link" => $this->getExtension()->getExtensionUrl() . "SharedProfiles/")));
$tabBar->setActiveTab(1);
$clearer = new \Widgets\Clearer();
$loader = new \Widgets\Loader();
$loader->setWrapperId("artefactsWrapper");
$loader->setMessage("loading artefacts ...");
$loader->setCommand("loadArtefacts");
$loader->setParams(array(0 => $this->portfolioId));
$loader->setElementId("artefactsWrapper");
$loader->setType("updater");
$frameResponseObject->setTitle("Belege verwalten");
$frameResponseObject->addWidget($actionBar);
$frameResponseObject->addWidget($breadcrumb);
$frameResponseObject->addWidget($tabBar);
$frameResponseObject->addWidget($clearer);
$frameResponseObject->addWidget($loader);
//$frameResponseObject->addWidget($rawHtml);
return $frameResponseObject;
}
示例5: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$actionBar = new \Widgets\ActionBar();
$this->getExtension()->addJS();
$actionBar->setActions(array(array("name" => \Portfolio::getInstance()->getText("newArtefacts"), "ajax" => array("onclick" => array("command" => "newArtefactForm", "namespace" => "portfolio", "params" => "", "requestType" => "popup")))));
// array("name" => "Bild anfügen<img src=\"{$editIcon}\">", "command" => "EditMessageImage", "namespace" => "forum", "params" => "{'messageObjectId':'{$this->id}','forum':'{$forumId}'}", "type" => "popup");
$breadcrumb = new \Widgets\Breadcrumb();
$breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Manage Artefacts"))));
$tabBar = new \Widgets\TabBar();
$tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => \Portfolio::getInstance()->getText("Competences"), "link" => $this->getExtension()->getExtensionUrl() . "ViewChart/"), array("name" => \Portfolio::getInstance()->getText("Artefacts"), "link" => $this->getExtension()->getExtensionUrl() . "ManageArtefacts/")));
$tabBar->setActiveTab(2);
$clearer = new \Widgets\Clearer();
$loader = new \Widgets\Loader();
$loader->setWrapperId("artefactsWrapper");
$loader->setMessage("loading artefacts ...");
$loader->setCommand("loadArtefacts");
$loader->setParams($this->params);
$loader->setElementId("artefactsWrapper");
$loader->setType("updater");
$frameResponseObject->setTitle("Manage Artefacts");
$frameResponseObject->addWidget($actionBar);
$frameResponseObject->addWidget($breadcrumb);
$frameResponseObject->addWidget($tabBar);
$frameResponseObject->addWidget($clearer);
$frameResponseObject->addWidget($loader);
//$frameResponseObject->addWidget($rawHtml);
return $frameResponseObject;
}
示例6: 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;
}
示例7: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$tpl = new \Worksheet\Template($this->id);
$worksheet = new \Worksheet\Worksheet($this->id);
$worksheet->validateRole("build");
$tplBlocks = array();
/* get all blocks for this worksheet */
$blocks = $worksheet->getBlocks();
foreach ($blocks as $block) {
$tplBlocks[] = array("id" => $block->getId(), "name" => $block->getName(), "content" => $block->getBuildViewHtml(), "type" => $block->getType(), "order" => $block->getOrder());
}
if (count($blocks) == 0) {
$tplBlocks = false;
}
$tpl->assign("blocks", $tplBlocks);
$tpl->display("Build.template.html");
/* action bar */
$actionBar = new \Widgets\ActionBar();
$actionBar->setActions(array(array("name" => "Eine Aufgabe hinzufügen", "link" => PATH_URL . "worksheet/AddBlock/" . $this->id), array("name" => "Arbeitsblatt veröffentlichen", "link" => PATH_URL . "worksheet/Deploy/" . $this->id)));
$frameResponseObject->addWidget($actionBar);
/* template output */
$tpl->parse($frameResponseObject);
/* page title */
$frameResponseObject->setTitle($worksheet->getName());
$frameResponseObject->setHeadline(array(array("name" => $worksheet->getName(), "link" => PATH_URL . "worksheet/Build/" . $this->id)));
return $frameResponseObject;
}
示例8: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$html = "";
if (isset($this->params[0]) && $this->params[0] != "") {
$extension = \ExtensionMaster::getInstance()->getExtensionById($this->params[0]);
$html = $extension->getInfoHtml();
} else {
$content = \Admin::getInstance()->loadTemplate("ExtensionIndex.template.html");
$extensions = \ExtensionMaster::getInstance()->getAllExtensions();
foreach ($extensions as $extension) {
$content->setCurrentBlock("BLOCK_EXTERNSION");
$content->setVariable("EXTERNSION_ID", $extension->getId());
$content->setVariable("EXTERNSION_NAME", $extension->getName());
$content->setVariable("EXTERNSION_ICON", "");
$content->setVariable("EXTERNSION_VERSION", $extension->getVersion());
$content->parse("BLOCK_EXTERNSION");
}
$html = $content->get();
}
$rawHtml = new \Widgets\RawHtml();
$rawHtml->setHtml($html);
$frameResponseObject->setTitle("Extension Information");
$frameResponseObject->addWidget($rawHtml);
return $frameResponseObject;
}
示例9: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$tpl = new \Worksheet\Template($this->id);
$worksheet = new \Worksheet\Worksheet($this->id);
$worksheet->validateRole("edit");
$worksheet->validateStatus(2);
$tplBlocks = array();
/* get all blocks for this worksheet */
$blocks = $worksheet->getBlocks();
foreach ($blocks as $block) {
$tplBlocks[] = array("id" => $block->getId(), "name" => $block->getName(), "content" => $block->getCorrectHtml(), "type" => $block->getType(), "order" => $block->getOrder());
}
if (count($blocks) == 0) {
$tplBlocks = false;
}
$tpl->assign("blocks", $tplBlocks);
$tpl->display("Correct.template.html");
$sourceWorksheet = new \Worksheet\Worksheet($this->source);
/* action bar */
$actionBar = new \Widgets\ActionBar();
$actionBar->setActions(array(array("name" => "Arbeitsblatt zurückgeben", "link" => "javascript: worksheet_finish('" . $this->source . "')"), array("name" => "Speichern", "link" => "javascript: worksheet_save()")));
$frameResponseObject->addWidget($actionBar);
/* template output */
$tpl->parse($frameResponseObject);
/* action bar */
$actionBar = new \Widgets\ActionBar();
$actionBar->setActions(array(array("name" => "Arbeitsblatt zurückgeben", "link" => "javascript: worksheet_finish('" . $this->source . "')"), array("name" => "Speichern", "link" => "javascript: worksheet_save()")));
$frameResponseObject->addWidget($actionBar);
/* page title */
$frameResponseObject->setTitle($worksheet->getName());
$frameResponseObject->setHeadline(array(array("name" => $sourceWorksheet->getName(), "link" => PATH_URL . "worksheet/View/" . $this->source), array("name" => "Arbeitsblätter korrigieren", "link" => PATH_URL . "worksheet/CopyList/" . $this->source), array("name" => $worksheet->getName())));
return $frameResponseObject;
}
示例10: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$activities = \CompetenceRaster::getActivityFields();
$jobs = \CompetenceRaster::getJobs();
$facets = \CompetenceRaster::getFacets();
$listViewer = new \Widgets\ListViewer();
\CompetenceRaster::initReadCompetences();
$steamUser = $GLOBALS["STEAM"]->get_current_steam_user();
//print("<pre>".print_r($activities,true)."</pre>");
//print("<pre>".print_r(\CompetenceRaster::$competences,true)."</pre>");
$html_text = "";
$html_text .= "<h2>Bereiche</h2><br>";
foreach ($activities as $activity) {
$html_text .= $activity->name . ":<br>" . $activity->description . "<br><br>";
}
$html_text .= "<h2>Jobs</h2><br>";
foreach ($jobs as $activity) {
$html_text .= $activity->name . ":<br>" . $activity->description . "<br><br>";
}
$html_text .= "<h2>Aspekte</h2><br>";
foreach ($facets as $activity) {
$html_text .= $activity->name . ":<br>" . $activity->description . "<br><br>";
}
$html_text .= "<h2>Kompetenzen</h2><br>";
foreach (\CompetenceRaster::getCompetences() as $activity) {
//foreach (\CompetenceRaster::$competences as $activity){
$html_text .= "Name: " . $activity->name . "<br>ID: " . $activity->job . "<br>facet: " . $activity->facet . "<br>activity: " . $activity->activity . "<br>index: " . $activity->index . "<br>" . "Beschreibung: " . $activity->description . "<br><br>";
}
$rawHtml = new \Widgets\RawHtml();
$rawHtml->setHtml($html_text);
$frameResponseObject->addWidget($rawHtml);
return $frameResponseObject;
}
示例11: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$jsWrapper = new \Widgets\JSWrapper();
$jsWrapper->setJs('self.location.href="' . PATH_URL . "favorite/index/" . '"');
$frameResponseObject->addWidget($jsWrapper);
return $frameResponseObject;
}
示例12: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$tpl = new \Worksheet\Template($this->id);
$worksheet = new \Worksheet\Worksheet($this->id);
$worksheet->validateRole("view");
$tplBlocks = array();
/* get all blocks for this worksheet */
$blocks = $worksheet->getBlocks();
foreach ($blocks as $block) {
$tplBlocks[] = array("id" => $block->getId(), "name" => $block->getName(), "content" => $block->getViewHtml(), "type" => $block->getType(), "order" => $block->getOrder());
}
if (count($blocks) == 0) {
$tplBlocks = false;
}
$tpl->assign("blocks", $tplBlocks);
$tpl->display("View.template.html");
/* action bar */
$actionBar = new \Widgets\ActionBar();
$actionBar->setActions(array(array("name" => "Arbeitsblätter korrigieren", "link" => PATH_URL . "worksheet/CopyList/" . $this->id), array("name" => "Arbeitsblatt ausfüllen", "link" => PATH_URL . "worksheet/StartEdit/" . $this->id)));
$frameResponseObject->addWidget($actionBar);
/* template output */
$tpl->parse($frameResponseObject);
/* page title */
$frameResponseObject->setTitle($worksheet->getName());
$frameResponseObject->setHeadline(array(array("name" => $worksheet->getName(), "link" => PATH_URL . "worksheet/View/" . $this->id)));
return $frameResponseObject;
}
示例13: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
if (isset($this->id)) {
$object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
if ($object instanceof \steam_document) {
$mimetype = $object->get_attribute(DOC_MIME_TYPE);
$objName = $object->get_name();
$objDesc = trim($object->get_attribute(OBJ_DESC));
if ($objDesc === 0 || $objDesc === "") {
$name = $objName;
} else {
$name = $objDesc . " (" . $objName . ")";
}
$actionBar = new \Widgets\ActionBar();
$actionBar->setActions(array(array("name" => "Anzeigen", "link" => PATH_URL . "Explorer/ViewDocument/" . $this->id . "/"), array("name" => "Bearbeiten", "link" => PATH_URL . "Explorer/EditDocument/" . $this->id . "/"), array("name" => "Eigenschaften", "ajax" => array("onclick" => array("command" => "properties", "params" => array("id" => $this->id), "requestType" => "popup"))), array("name" => "Rechte", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => $this->id), "requestType" => "popup")))));
$contentText = new \Widgets\TextareaCode();
$contentText->setWidth(945);
$contentText->setRows(50);
$contentText->setData($object);
$contentText->setContentProvider(\Widgets\DataProvider::contentProvider());
$clearer = new \Widgets\Clearer();
// $html = "";
// if ($mimetype == "image/png" || $mimetype == "image/jpeg" || $mimetype == "image/gif") { // Image
// $html = "<div style=\"text-align:center\"><img style=\"max-width:100%\" title=\"{$name}\" alt=\"Bild: {$name}\" src=\"" . PATH_URL . "Download/Document/" . $this->id . "/\"></div>";
// } else if ($mimetype == "text/html") {
// $html = strip_tags($object->get_content(),"<h1><h2><h3><h4><h5><p><a><div><style><b><i><strong><img>");
// } else if (strstr($mimetype, "text")) {
// $html = "<pre>{$object->get_content()}</pre>";
// } else {
// header("location: " . PATH_URL . "Download/Document/" . $this->id . "/");
// }
// $rawHtml = new \Widgets\RawHtml();
// $rawHtml->setHtml($html);
//$rawHtml->addWidget($breadcrumb);
//$rawHtml->addWidget($environment);
//$rawHtml->addWidget($loader);
$frameResponseObject->setTitle($name);
$frameResponseObject->addWidget($actionBar);
//$frameResponseObject->addWidget($rawHtml);
$frameResponseObject->addWidget($contentText);
$frameResponseObject->addWidget($clearer);
return $frameResponseObject;
}
} else {
ExtensionMaster::getInstance()->send404Error();
}
}
示例14: 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_attribute("USER_BOOKMARKROOM");
$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 = "Lesezeichen";
$bookmarkParentFolderId = $currentUser->get_attribute("USER_BOOKMARKROOM")->get_id();
if ($this->id != $bookmarkParentFolderId) {
$title .= " - " . $object->get_name();
}
$breadcrumb = new \Widgets\Breadcrumb();
$breadcrumb->setData(array("", array("name" => "<img src=\"" . PATH_URL . "explorer/asset/icons/mimetype/reference_folder.png\"></img> " . $title . " ")));
//$bookmarkIcon = \Bookmarks::getInstance()->getAssetUrl() . "icons/bookmark.png";
//$breadcrumb = new \Widgets\Breadcrumb();
//$breadcrumb->setData(array(array("name"=>"<img src=\"{$bookmarkIcon}\"> Lesezeichenordner")));
$actionBar = new \Widgets\ActionBar();
$actionBar->setActions(array(array("name" => "Ordner anlegen", "ajax" => array("onclick" => array("command" => "newElement", "params" => array("id" => $this->id), "requestType" => "popup")))));
//$actionBar->setActions(array(array("name"=>"Neu", "ajax"=>array("onclick"=>array("command"=>"newelement"))), array("name"=>"Eigenschaften", "link"=>PATH_URL."explorer/properties/"), array("name"=>"Rechte", "link"=>PATH_URL."explorer/rights/")));
$loader = new \Widgets\Loader();
$loader->setWrapperId("bookmarksWrapper");
$loader->setMessage("Lade Lesezeichen ...");
$loader->setCommand("loadBookmarks");
$loader->setParams(array("id" => $this->id));
$loader->setElementId("bookmarksWrapper");
$loader->setType("updater");
$frameResponseObject->setTitle("Lesezeichen");
$frameResponseObject->addWidget($actionBar);
$frameResponseObject->addWidget($breadcrumb);
$frameResponseObject->addWidget($loader);
return $frameResponseObject;
}
示例15: frameResponse
public function frameResponse(\FrameResponseObject $frameResponseObject)
{
$rawWidget = $this->displayWorkplans();
$frameResponseObject->setTitle("Projektplanverwaltung");
$frameResponseObject->setHeadline("Projektplanverwaltung");
$frameResponseObject->addWidget($rawWidget);
return $frameResponseObject;
}