private function getHydraOperations(string $resourceClass, ResourceMetadata $resourceMetadata, string $prefixedShortName, bool $collection) : array
{
if (null === ($operations = $collection ? $resourceMetadata->getCollectionOperations() : $resourceMetadata->getItemOperations())) {
return [];
}
$hydraOperations = [];
foreach ($operations as $operationName => $operation) {
$hydraOperations[] = $this->getHydraOperation($resourceClass, $resourceMetadata, $operationName, $operation, $prefixedShortName, $collection);
}
return $hydraOperations;
}