Source of file RelatedPageLink.php
Size: 1,011 Bytes - Last Modified: 2021-12-24T06:43:14+00:00
/var/www/docs.ssmods.com/process/src/src/Model/RelatedPageLink.php
1234567891011121314151617181920212223242526272829303132333435363738 | <?php namespace CWP\CWP\Model; use CWP\CWP\PageTypes\BasePage; use SilverStripe\ORM\DataObject; use SilverStripe\Versioned\Versioned; class RelatedPageLink extends DataObject { private static $table_name = 'BasePage_RelatedPages'; private static $extensions = [ Versioned::class, ]; private static $db = [ 'SortOrder' => 'Int', ]; /** * For backwards compatibility these must match a traditional 'many_many' definition. * This was BasePage.RelatedPages => BasePage * ManyMany relations are normally joined by ${DefiningClass}ID && ${RelatedClass}ID * excepting in the case where ${DefiningClass} === ${RelatedClass} * Then the 'related class' column changes from ${RelatedClass}ID to "ChildID". * * {@see SilverStripe\ORM\DataObjectSchema->parseManyManyComponent()} * * @var array * @config */ private static $has_one = [ 'BasePage' => BasePage::class, 'Child' => BasePage::class, ]; } |