mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Fixed tabbing in DataObjectSet
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100491 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
3d41240478
commit
9f45951a43
@ -617,17 +617,17 @@ class DataObjectSet extends ViewableData implements IteratorAggregate, Countable
|
||||
|
||||
return $map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find an item in this list where the field $key is equal to $value
|
||||
* Eg: $doSet->find('ID', 4);
|
||||
* @return ViewableData The first matching item.
|
||||
*/
|
||||
public function find($key, $value) {
|
||||
foreach($this->items as $item) {
|
||||
if($item->$key == $value) return $item;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find an item in this list where the field $key is equal to $value
|
||||
* Eg: $doSet->find('ID', 4);
|
||||
* @return ViewableData The first matching item.
|
||||
*/
|
||||
public function find($key, $value) {
|
||||
foreach($this->items as $item) {
|
||||
if($item->$key == $value) return $item;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a column of the given field
|
||||
|
Loading…
Reference in New Issue
Block a user