mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: $this->extraData is not alway set for an TableField_Item
API: add funcion TableField_Item::IsAddRow() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64325 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ab0503fe22
commit
480f18ab48
@ -192,7 +192,6 @@ class TableField extends TableListField {
|
|||||||
$output->push(new TableField_Item(null, $this, null, $this->fieldTypes, true));
|
$output->push(new TableField_Item(null, $this, null, $this->fieldTypes, true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +235,7 @@ class TableField extends TableListField {
|
|||||||
if($fieldset){
|
if($fieldset){
|
||||||
$newitem[ID] = "new".$k;
|
$newitem[ID] = "new".$k;
|
||||||
foreach($newitem as $k => $v){
|
foreach($newitem as $k => $v){
|
||||||
if(array_key_exists($k, $this->extraData)){
|
if($this->extraData&&array_key_exists($k, $this->extraData)){
|
||||||
unset($newitem[$k]);
|
unset($newitem[$k]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -692,7 +691,6 @@ class TableField_Item extends TableListField_Item {
|
|||||||
if($ruleApplies) {
|
if($ruleApplies) {
|
||||||
$field = $field->$transformation();
|
$field = $field->$transformation();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// formatting
|
// formatting
|
||||||
@ -737,7 +735,6 @@ class TableField_Item extends TableListField_Item {
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new DataObjectSet($this->fields);
|
return new DataObjectSet($this->fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -760,6 +757,10 @@ class TableField_Item extends TableListField_Item {
|
|||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function IsAddRow(){
|
||||||
|
return $this->isAddRow;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user