2017-06-22 17:15:17 +12:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\TagField\Tests\Stub;
|
|
|
|
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
use SilverStripe\ORM\DataObject;
|
2023-01-11 13:13:48 +13:00
|
|
|
use SilverStripe\ORM\ManyManyList;
|
2017-06-22 17:15:17 +12:00
|
|
|
|
2023-01-11 13:13:48 +13:00
|
|
|
/**
|
|
|
|
* @property string $Content
|
|
|
|
* @property int $PrimaryTagID
|
|
|
|
* @method TagFieldTestBlogTag PrimaryTag()
|
|
|
|
* @method ManyManyList|TagFieldTestBlogTag[] Tags()
|
|
|
|
*/
|
2017-06-22 17:15:17 +12:00
|
|
|
class TagFieldTestBlogPost extends DataObject implements TestOnly
|
|
|
|
{
|
|
|
|
private static $table_name = 'TagFieldTestBlogPost';
|
|
|
|
|
|
|
|
private static $db = [
|
|
|
|
'Title' => 'Text',
|
|
|
|
'Content' => 'Text'
|
|
|
|
];
|
|
|
|
|
|
|
|
private static $many_many = [
|
|
|
|
'Tags' => TagFieldTestBlogTag::class
|
|
|
|
];
|
2022-06-07 13:00:12 +12:00
|
|
|
|
|
|
|
private static $has_one = [
|
|
|
|
'PrimaryTag' => TagFieldTestBlogTag::class
|
|
|
|
];
|
2017-06-22 17:15:17 +12:00
|
|
|
}
|