2008-10-29 22:07:17 +01:00
|
|
|
<?php
|
2016-06-15 06:03:16 +02:00
|
|
|
|
2016-10-14 03:30:05 +02:00
|
|
|
namespace SilverStripe\i18n\Tests\i18nTest;
|
|
|
|
|
2017-01-18 04:58:48 +01:00
|
|
|
use SilverStripe\Admin\LeftAndMain;
|
2016-06-15 06:03:16 +02:00
|
|
|
use SilverStripe\ORM\DataObject;
|
2016-08-19 00:51:35 +02:00
|
|
|
use SilverStripe\Dev\TestOnly;
|
2016-10-14 03:30:05 +02:00
|
|
|
use SilverStripe\Security\Group;
|
|
|
|
|
|
|
|
class MyObject extends DataObject implements TestOnly
|
|
|
|
{
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $table_name = 'i18nTest_MyObject';
|
2016-08-19 00:51:35 +02:00
|
|
|
|
2020-04-20 19:58:09 +02:00
|
|
|
private static $db = [
|
2016-12-16 05:34:21 +01:00
|
|
|
'FirstProperty' => 'Varchar',
|
|
|
|
'SecondProperty' => 'Int'
|
2020-04-20 19:58:09 +02:00
|
|
|
];
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2020-04-20 19:58:09 +02:00
|
|
|
private static $has_many = [
|
2016-12-16 05:34:21 +01:00
|
|
|
'Relation' => Group::class
|
2020-04-20 19:58:09 +02:00
|
|
|
];
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $singular_name = "My Object";
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $plural_name = "My Objects";
|
2017-01-18 04:58:48 +01:00
|
|
|
|
|
|
|
public function provideI18nEntities()
|
|
|
|
{
|
|
|
|
$entities = parent::provideI18nEntities();
|
|
|
|
return array_merge($entities, [
|
2018-01-16 19:39:30 +01:00
|
|
|
LeftAndMain::class . '.OTHER_TITLE' => [
|
2017-01-18 04:58:48 +01:00
|
|
|
'default' => 'Other title',
|
|
|
|
'module' => 'admin',
|
|
|
|
],
|
|
|
|
]);
|
|
|
|
}
|
2008-10-29 22:07:17 +01:00
|
|
|
}
|