mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-04 15:18:39 +02:00
FEATURE added hasDatabaseField()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50942 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c5d538c366
commit
8e884437fe
@ -1222,6 +1222,17 @@ class DataObject extends ViewableData implements DataObjectInterface {
|
|||||||
return array_key_exists($field, $this->record);
|
return array_key_exists($field, $this->record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if the given field exists as a database column
|
||||||
|
*
|
||||||
|
* @param string $field Name of the field
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function hasDatabaseField($field) {
|
||||||
|
return array_key_exists($field, $this->databaseFields());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the member is allowed to do the given action.
|
* Returns true if the member is allowed to do the given action.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user