aboutsummaryrefslogtreecommitdiff
path: root/h-source/Library/Scaffold.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-07-28 20:27:23 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-07-28 20:27:23 +0000
commite7b3717614621f14695ab6ca6dda6dd17ba3d65c (patch)
treec8e6061aef3ff7bad5a17e1aecaf441d35e282cb /h-source/Library/Scaffold.php
parent0de74c6879d263645770de3d6b3ce7123f5241d6 (diff)
added new easygiant library
Diffstat (limited to 'h-source/Library/Scaffold.php')
-rwxr-xr-xh-source/Library/Scaffold.php50
1 files changed, 28 insertions, 22 deletions
diff --git a/h-source/Library/Scaffold.php b/h-source/Library/Scaffold.php
index aa20a4b..b1941dc 100755
--- a/h-source/Library/Scaffold.php
+++ b/h-source/Library/Scaffold.php
@@ -101,32 +101,38 @@ class Scaffold
{
$this->_primaryKey = $primaryKey;
- $recordListArray = explode(',',$recordList);
- foreach ($recordListArray as $record) {
- $this->itemList->addItem("simpleText",";$record;");
+ if (strcmp($recordList,'') !== 0)
+ {
+ $recordListArray = explode(',',$recordList);
+ foreach ($recordListArray as $record) {
+ $this->itemList->addItem("simpleText",";$record;");
+ }
}
$themeArray = explode(',',$theme);
- foreach ($themeArray as $el)
+ if (strcmp($theme,'') !== 0)
{
- switch ($el)
+ foreach ($themeArray as $el)
{
- case 'moveup':
- $this->itemList->addItem('moveupForm',$this->_controller.'/'.$this->params['mainAction'],$primaryKey);
- break;
- case 'movedown':
- $this->itemList->addItem('movedownForm',$this->_controller.'/'.$this->params['mainAction'],$primaryKey);
- break;
- case 'link':
- $this->itemList->addItem('associateForm',$this->_controller.'/'.$this->params['associateAction'],$primaryKey);
- break;
- case 'edit':
- $this->itemList->addItem('editForm',$this->_controller.'/'.$this->params['modifyAction'],$primaryKey);
- break;
- case 'del':
- $this->itemList->addItem('delForm',$this->_controller.'/'.$this->params['mainAction'],$primaryKey);
- break;
+ switch ($el)
+ {
+ case 'moveup':
+ $this->itemList->addItem('moveupForm',$this->_controller.'/'.$this->params['mainAction'],$primaryKey);
+ break;
+ case 'movedown':
+ $this->itemList->addItem('movedownForm',$this->_controller.'/'.$this->params['mainAction'],$primaryKey);
+ break;
+ case 'link':
+ $this->itemList->addItem('associateForm',$this->_controller.'/'.$this->params['associateAction'],$primaryKey);
+ break;
+ case 'edit':
+ $this->itemList->addItem('editForm',$this->_controller.'/'.$this->params['modifyAction'],$primaryKey);
+ break;
+ case 'del':
+ $this->itemList->addItem('delForm',$this->_controller.'/'.$this->params['mainAction'],$primaryKey);
+ break;
+ }
}
}
@@ -204,9 +210,9 @@ class Scaffold
}
//add an item to the list of items
- public function addItem($type, $action = '', $field = '', $name = '') {
+ public function addItem($type, $action = '', $field = '', $name = '', $value = '', $title = '') {
if ($this->_type === 'main') {
- $this->itemList->addItem($type, $action, $field, $name);
+ $this->itemList->addItem($type, $action, $field, $name, $value, $title);
}
}