Source for file LSitenodeParameters.php
Documentation is available at LSitenodeParameters.php
* @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
* @copyright 2005, diemeisterei GmbH. All rights reserved.
* @author $Author: schmunk $
* @version $Revision: 444 $ $Date: 2006-12-14 23:34:02 +0100 (Thu, 14 Dec 2006) $
* @package Phundament.Packages
* @subpackage LVirtualNodes
* Displays and manages the CSS menu (sitemap tree)
* @package System.Web.UI.WebControls
private $np_changed = false;
return $this->getViewState("NodePath", "1");
$this->np_changed = true;
$this->setViewState("NodePath", $value, "1");
return $this->getViewState("Mode", "Edit");
$this->setViewState("Mode", TPropertyValue::ensureEnum($value, array("Edit", "New")), "Edit");
$this->raiseEvent('OnReloadPage', $this, $param);
parent::onPreRender($param);
if (!$this->Page->IsPostBack || $this->np_changed)
$node = $this->Service->getNodes();
for ($i = 1; $i < count($p); $i++ )
$node = $node->getChildNodeAt($p[$i]);
if ($this->Mode == "Edit")
$this->RightsPanel->setRecord($node);
if ($this->Page->IsCallBack)
$cb = $this->Page->CallbackClient;
$cb->setValue($this->Alias, $node->getAlias());
$cb->setValue($this->DescriptiveName, $node->getDescriptiveName());
$cb->setValue($this->PageType, trim($node->getPage()));
$cb->update($this->RightsContainer, $this->RightsPanel);
$this->Alias->Text = $node->getAlias();
$this->DescriptiveName->Text = $node->getDescriptiveName();
$this->PageType->SelectedValue = trim($node->getPage());
$conn = $this->Application->getModule("database")->getConnection("l_virtual_nodes", "propel");
//echo "renaming page ".$path." to ".$name."<br>";
$node = $this->Service->getNodes();
for ($i = 1; $i < count($p); $i++ )
$node = $node->getChildNodeAt($p[$i]);
$node->setAlias($this->Alias->Text);
$node->setDescriptiveName($this->DescriptiveName->Text);
$node->setPage(trim($this->PageType->SelectedValue));
$conn = $this->Application->getModule("database")->getConnection("l_virtual_nodes", "propel");
//echo "setting rights for page ".$path."<br>";
$node = $this->Service->getNodes();
for ($i = 1; $i < count($p); $i++ )
$node = $node->getChildNodeAt($p[$i]);
LRightsManager::setRights($node, $this->RightsPanel);
$conn = $this->Application->getModule("database")->getConnection("l_virtual_nodes", "propel");
throw new Exception("Do not touch the root node!");
#echo "deleting page ".$path."<br>";exit;
$node = $this->Service->getNodes();
for ($i = 1; $i < count($p)- 1; $i++ )
$node = $node->getChildNodeAt($p[$i]);
$node->deleteChildNodeAt($p[count($p)- 1], $conn);
$conn = $this->Application->getModule("database")->getConnection("l_virtual_nodes", "propel");
//echo "adding page at ".$path."<br>";
$node = $this->Service->getNodes();
for ($i = 1; $i < count($p)- 1; $i++ )
$node = $node->getChildNodeAt($p[$i]);
$newpage = new LVirtualNodesSiteNode();
$newpage->setAlias($this->Alias->Text);
$newpage->setDescriptiveName($this->DescriptiveName->Text);
$newpage->setPage(trim($this->PageType->SelectedValue));
LRightsManager::setRights($newpage, $this->RightsPanel);
$node->insertNewNodeAt($p[count($p)- 1], $newpage, $conn);
|