Hey,
Did you ever get anywhere with this? I'm trying to do the same thing and it won't build (keeps coming up with "Unknown class passed as parameter" as an error (see below):
[Warning] Unknown class passed as parameter
GET /[website]/index.php/dev/build?flush=1
Line 420 in E:\Inetpub\[url=http://wwwroot\[website]\sapphire\core\Object.php]wwwroot\[website/]\sapphire\core\Object.php
Source
411 * Prepare static variables before processing a {@link get_static} or {@link set_static}
412 * call.
413 */
414 private static function prepare_statics($class) {
415 // _cache_statics_prepared setting must come first to prevent infinite loops when we call
416 // get_static below
417 self::$_cache_statics_prepared[$class] = true;
418
419 // load statics now for DataObject classes
420 if(is_subclass_of($class, 'DataObject')) {
421 $extensions = Object::get_static($class, 'extensions');
422 if($extensions) foreach($extensions as $extension) {
423 if(preg_match('/^([^(]*)/', $extension, $matches)) {
424 $extensionClass = $matches[1];
425 DataObjectDecorator::load_extra_statics($class, $extensionClass);
426 }
Trace
is_subclass_of(CustomRedirectorPage,DataObject)
Line 420 of Object.php
Object::prepare_statics(CustomRedirectorPage)
Line 175 of Object.php
Object::get_static(CustomRedirectorPage,db)
Line 264 of Object.php
Object::uninherited_static(CustomRedirectorPage,db)
Line 2016 of DataObject.php
DataObject::has_own_table(CustomRedirectorPage)
Line 89 of ClassInfo.php
ClassInfo::dataClassesFor(SiteTree)
Line 2254 of DataObject.php
DataObject->buildSQL(URLSegment = 'home')
Line 2519 of DataObject.php
DataObject->instance_get_one(URLSegment = 'home',)
Line 2464 of DataObject.php
DataObject::get_one(SiteTree,URLSegment = 'home')
Line 927 of SiteTree.php
SiteTree->requireDefaultRecords()
Line 214 of DatabaseAdmin.php
DatabaseAdmin->doBuild(,1)
Line 100 of DatabaseAdmin.php
DatabaseAdmin->build()
Line 135 of DevelopmentAdmin.php
DevelopmentAdmin->build(HTTPRequest)
Line 129 of RequestHandler.php
RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
Controller->handleRequest(HTTPRequest)
Line 277 of Director.php
Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
Director::direct(dev/build)
Line 118 of main.php
require_once(E:\Inetpub\[url=http://wwwroot\[website]\sapphire\main.php]wwwroot\[website/]\sapphire\main.php)
Line 71 of index.php