Source of file SolrIndexTest_AmbiguousRelationInheritedIndex.php
Size: 1,028 Bytes - Last Modified: 2021-12-23T10:31:32+00:00
/var/www/docs.ssmods.com/process/src/tests/SolrIndexTest/SolrIndexTest_AmbiguousRelationInheritedIndex.php
1234567891011121314151617181920212223242526272829 | <?php namespace SilverStripe\FullTextSearch\Tests\SolrIndexTest; use SilverStripe\FullTextSearch\Solr\SolrIndex; use SilverStripe\FullTextSearch\Tests\SearchUpdaterTest\SearchUpdaterTest_Container; use SilverStripe\FullTextSearch\Tests\SearchUpdaterTest\SearchUpdaterTest_ExtendedContainer; class SolrIndexTest_AmbiguousRelationInheritedIndex extends SolrIndex { protected function getStoredDefault() { // Override isDev defaulting to stored return 'false'; } public function init() { $this->addClass(SearchUpdaterTest_Container::class); // this one has not the relation defined in it's class but is rather inherited from parent // note that even if we do not include it's parent class the fields will be properly added $this->addClass(SearchUpdaterTest_ExtendedContainer::class); // These relationships exist on both classes $this->addFilterField('HasManyObjects.Field1'); $this->addFilterField('ManyManyObjects.Field1'); } } |