silverstripe-framework/tests/php/i18n/i18nTest/MyObject.php

38 lines
887 B
PHP
Raw Normal View History

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