コード例 #1
0
ファイル: configure.php プロジェクト: swk/bluebox
 public function postInstall()
 {
     $tree = Doctrine::getTable('Grouping')->getTree();
     $root = new Grouping();
     $root->name = 'Root';
     $root->locked = true;
     $root->save();
     $tree->createRoot($root);
     $branches = new Grouping();
     $branches->name = "Branches";
     $branches->locked = true;
     $branches->save();
     $branches->getNode()->insertAsLastChildOf($root);
     /*	This is sample data. There is no known way to tell if a user wants to install sample data :(
             foreach (explode(" ","Albany Christchurch Ellerslie Remote") AS $name) {
                     $branch=new Grouping;
                     $branch->name=$name;
                     $branch->save();
                     $branch->getNode()->insertAsLastChildOf($branches);
             }
     	// the last branch shows whatever is happening on remotebluebox
     	$branch['plugins']=array('directory'=>array('remote'=>'http://remotebluebox/directory/xmlout'));
     	$branch->save();
         }
     */
 }