@@ -49,7 +49,7 @@ trait OperationDataProviderTrait
49
49
*/
50
50
private function getCollectionData (array $ attributes , array $ context )
51
51
{
52
- return $ this ->collectionDataProvider ->getCollection ($ attributes ['output_class ' ], $ attributes ['collection_operation_name ' ], $ context );
52
+ return $ this ->collectionDataProvider ->getCollection ($ attributes ['output_class ' ] ?: $ attributes [ ' resource_class ' ] , $ attributes ['collection_operation_name ' ], $ context );
53
53
}
54
54
55
55
/**
@@ -59,7 +59,7 @@ private function getCollectionData(array $attributes, array $context)
59
59
*/
60
60
private function getItemData ($ identifiers , array $ attributes , array $ context )
61
61
{
62
- return $ this ->itemDataProvider ->getItem ($ attributes ['output_class ' ], $ identifiers , $ attributes ['item_operation_name ' ], $ context );
62
+ return $ this ->itemDataProvider ->getItem ($ attributes ['output_class ' ] ?: $ attributes [ ' resource_class ' ] , $ identifiers , $ attributes ['item_operation_name ' ], $ context );
63
63
}
64
64
65
65
/**
@@ -75,7 +75,7 @@ private function getSubresourceData($identifiers, array $attributes, array $cont
75
75
throw new RuntimeException ('Subresources not supported ' );
76
76
}
77
77
78
- return $ this ->subresourceDataProvider ->getSubresource ($ attributes ['output_class ' ], $ identifiers , $ attributes ['subresource_context ' ] + $ context , $ attributes ['subresource_operation_name ' ]);
78
+ return $ this ->subresourceDataProvider ->getSubresource ($ attributes ['output_class ' ] ?: $ attributes [ ' resource_class ' ] , $ identifiers , $ attributes ['subresource_context ' ] + $ context , $ attributes ['subresource_operation_name ' ]);
79
79
}
80
80
81
81
/**
@@ -93,7 +93,7 @@ private function extractIdentifiers(array $parameters, array $attributes)
93
93
$ id = $ parameters ['id ' ];
94
94
95
95
if (null !== $ this ->identifierConverter ) {
96
- return $ this ->identifierConverter ->convert ((string ) $ id , $ attributes ['output_class ' ]);
96
+ return $ this ->identifierConverter ->convert ((string ) $ id , $ attributes ['output_class ' ] ?: $ attributes [ ' resource_class ' ] );
97
97
}
98
98
99
99
return $ id ;
0 commit comments