|
@@ -297,9 +297,16 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
|
|
|
|
|
|
// revisions: [Concernement]
|
|
|
$registry->addFieldResolver('Concernement', 'revisions',
|
|
|
- $builder->produce('entity_reference')
|
|
|
- ->map('entity', $builder->fromParent())
|
|
|
- ->map('field', $builder->fromValue('field_doleancer'))
|
|
|
+ $builder->compose(
|
|
|
+ $builder->callback(function($parent, $arg){
|
|
|
+ $vids = \Drupal::entityTypeManager()->getStorage('node')->revisionIds($parent);
|
|
|
+ $revisions = [];
|
|
|
+ foreach($vids as $vid){
|
|
|
+ $revisions[] = \Drupal::entityTypeManager()->getStorage('node')->loadRevision($vid);
|
|
|
+ }
|
|
|
+ return $revisions;
|
|
|
+ })
|
|
|
+ )
|
|
|
);
|
|
|
|
|
|
}
|