Source of file Related.php
Size: 0,973 Bytes - Last Modified: 2021-12-23T10:35:47+00:00
/var/www/docs.ssmods.com/process/src/tests/php/VersionedOwnershipTest/Related.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 | <?php namespace SilverStripe\Versioned\Tests\VersionedOwnershipTest; use SilverStripe\Dev\TestOnly; use SilverStripe\ORM\DataObject; use SilverStripe\Versioned\RecursivePublishable; use SilverStripe\Versioned\Versioned; /** * Object which: * - owned by has_many objects * - owns many_many Objects * * @mixin RecursivePublishable * @mixin Versioned */ class Related extends DataObject implements TestOnly { private static $extensions = [ Versioned::class, ]; private static $table_name = 'VersionedOwnershipTest_Related'; private static $db = [ 'Title' => 'Varchar(255)', ]; private static $has_many = [ 'Parents' => Subclass::class . '.Related', ]; private static $owned_by = [ 'Parents', ]; private static $many_many = [ // Note : Currently unversioned, take care 'Attachments' => Attachment::class, ]; private static $owns = [ 'Attachments', ]; } |