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 int Sort
|
|
|
|
* @method ManyManyList|TagFieldTestBlogPost[] BlogPosts()
|
|
|
|
*/
|
2017-06-22 17:15:17 +12:00
|
|
|
class TagFieldTestBlogTag extends DataObject implements TestOnly
|
|
|
|
{
|
|
|
|
private static $table_name = 'TagFieldTestBlogTag';
|
|
|
|
|
|
|
|
private static $default_sort = '"TagFieldTestBlogTag"."ID" ASC';
|
|
|
|
|
|
|
|
private static $db = [
|
2023-01-11 13:13:48 +13:00
|
|
|
'Title' => 'Varchar(200)',
|
|
|
|
'Sort' => 'Int',
|
2017-06-22 17:15:17 +12:00
|
|
|
];
|
|
|
|
|
|
|
|
private static $belongs_many_many = [
|
|
|
|
'BlogPosts' => TagFieldTestBlogPost::class
|
|
|
|
];
|
2023-01-11 13:13:48 +13:00
|
|
|
|
|
|
|
public function getLabel(): string
|
|
|
|
{
|
|
|
|
return 'Label: ' . $this->Title;
|
|
|
|
}
|
2017-06-22 17:15:17 +12:00
|
|
|
}
|