2017-06-21 06:29:40 +02:00
|
|
|
<?php
|
|
|
|
|
2017-08-09 03:25:12 +02:00
|
|
|
namespace SilverStripe\CMS\Tests;
|
|
|
|
|
|
|
|
|
2017-06-21 06:29:40 +02:00
|
|
|
use SilverStripe\Dev\TestOnly;
|
2017-08-09 03:25:12 +02:00
|
|
|
use Page;
|
|
|
|
|
2017-06-21 06:29:40 +02:00
|
|
|
|
|
|
|
class VirtualPageTest_ClassA extends Page implements TestOnly
|
|
|
|
{
|
|
|
|
private static $db = array(
|
|
|
|
'MyInitiallyCopiedField' => 'Text',
|
|
|
|
'MyVirtualField' => 'Text',
|
|
|
|
'MyNonVirtualField' => 'Text',
|
|
|
|
'CastingTest' => 'VirtualPageTest_TestDBField'
|
|
|
|
);
|
|
|
|
|
|
|
|
private static $allowed_children = array('VirtualPageTest_ClassB');
|
|
|
|
|
|
|
|
public function modelMethod()
|
|
|
|
{
|
|
|
|
return 'hi there';
|
|
|
|
}
|
|
|
|
}
|