ENHANCEMENT #5977 Added optional argument to ClassInfo::getValidSubClasses() and removed harcoded SiteTree

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110467 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2010-09-06 04:19:44 +00:00 committed by Sam Minnee
parent 8bcfa7b715
commit c5bf8a31cb

View File

@ -52,9 +52,10 @@ class ClassInfo {
/**
* Returns the manifest of all classes which are present in the database.
* @param string $class Class name to check enum values for ClassName field
*/
static function getValidSubClasses(){
return DB::getConn()->enumValuesForField("SiteTree", "ClassName");
static function getValidSubClasses($class = 'SiteTree') {
return DB::getConn()->enumValuesForField($class, 'ClassName');
}
/**