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:
Ingo Schommer 2008-03-12 09:21:49 +00:00
parent c5d538c366
commit 8e884437fe

View File

@ -1222,6 +1222,17 @@ class DataObject extends ViewableData implements DataObjectInterface {
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.
*