mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
8dd644d25d
Namespace all templates Move difflib and BBCodeParser2 to thirdparty Remove deprecated API marked for removal in 4.0
33 lines
721 B
PHP
33 lines
721 B
PHP
<?php
|
|
|
|
namespace DataObjectTest;
|
|
use SilverStripe\ORM\DataObject;
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
|
|
|
|
/**
|
|
* Right now this is only used in DataListTest, but extending it to DataObjectTest in the future would make sense.
|
|
* Note that it was deliberated named to include "\N" to try and trip bad code up.
|
|
*/
|
|
class NamespacedClass extends DataObject implements TestOnly {
|
|
private static $db = array(
|
|
'Name' => 'Varchar',
|
|
);
|
|
|
|
private static $has_many = array(
|
|
'Relations' => 'DataObjectTest\RelationClass'
|
|
);
|
|
}
|
|
|
|
class RelationClass extends DataObject implements TestOnly {
|
|
|
|
private static $db = array(
|
|
'Title' => 'Varchar'
|
|
);
|
|
|
|
private static $has_one = array(
|
|
'Parent' => 'SilverStripe\\ORM\\DataObject'
|
|
);
|
|
}
|