mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
8bcfa7b715
commit
c5bf8a31cb
@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user