mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT #5977 Added optional argument to ClassInfo::getValidSubClasses() and removed harcoded SiteTree (from r110467)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112843 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
6fa348a2cb
commit
6f8baaa2c9
@ -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…
x
Reference in New Issue
Block a user