-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMockNativePoly.php
More file actions
36 lines (28 loc) · 788 Bytes
/
MockNativePoly.php
File metadata and controls
36 lines (28 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
namespace ChrisPenny\DataObjectToFixture\Tests\Mocks\Pages;
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\DataObject;
/**
* Uses the Silverstripe 5 array-format polymorphic has_one definition.
*
* @property string $Title
* @property int $OwnerID
* @property string $OwnerClass
* @method DataObject Owner()
*/
class MockNativePoly extends DataObject implements TestOnly
{
private static string $table_name = 'DOToFixture_MockNativePoly';
private static array $db = [
'Title' => 'Varchar',
];
private static array $has_one = [
'Owner' => [
'class' => DataObject::class,
'type' => 'polymorphic',
],
];
private static array $field_classname_map = [
'OwnerID' => 'OwnerClass',
];
}