Project

General

Profile

Story #84916

Updated by Oliver Hader about 6 years ago

Expected goal 

 <pre> 
 $contentSchemaDefinition = (new SomeService)->getSchemaDefinition('tt_content'); 
 $fileReferenceSchemaDefinition = (new SomeService)->getSchemaDefinition('sys_file_reference'); 
 var_dump($contentSchemaDefinition->getProperty('media')->getRelations()); 
 var_dump($fileReferenceSchemaDefinition->getProperty('uid_foreign')->getRelations()); 
 </pre> 

 might output something like 

 <pre> 
 # relations for tt_content.media 
 + ActiveRelation: schemaName "sys_file_reference" 
 </pre> 

 <pre> 
 # relations for sys_file_reference.uid_foreign 
 + PassiveRelation: schemaName "tt_content", propertyName: "image" 
 + PassiveRelation: schemaName "tt_content", propertyName: "media" 
 + PassiveRelation: schemaName "tt_content", propertyName: "assets" 
 </pre> 

 Currently the "opposite usage" for relations is not explicitly known. In order to enhance look ups this information should be cached along with the plain schema definition (e.g. TCA).

Back