2016-10-14 03:30:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\ORM\Tests\ManyManyListTest;
|
|
|
|
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
use SilverStripe\ORM\DataExtension;
|
2017-05-17 07:40:13 +02:00
|
|
|
use SilverStripe\ORM\ManyManyList;
|
2016-10-14 03:30:05 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* An extension that is applied to ManyManyListTest_Secondary that
|
|
|
|
* implements the other side of the many-many relationship.
|
2017-05-17 07:40:13 +02:00
|
|
|
*
|
|
|
|
* @method ManyManyList Primary()
|
2016-10-14 03:30:05 +02:00
|
|
|
*/
|
|
|
|
class IndirectSecondaryExtension extends DataExtension implements TestOnly
|
|
|
|
{
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $db = array(
|
|
|
|
'Title' => 'Varchar(255)'
|
|
|
|
);
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $belongs_many_many = array(
|
|
|
|
'Primary' => IndirectPrimary::class
|
|
|
|
);
|
2016-10-14 03:30:05 +02:00
|
|
|
}
|