Source of file FieldFormatter.php
Size: 0,587 Bytes - Last Modified: 2021-12-23T10:27:20+00:00
/var/www/docs.ssmods.com/process/src/_legacy/GraphQL/FieldFormatter.php
123456789101112131415161718192021222324252627282930 | <?php namespace SilverStripe\Admin\GraphQL; use SilverStripe\Core\Convert; /** * @internal Use GraphQL v4 instead */ class FieldFormatter { /** * A couple of hacks to make sure ID gets formatted correctly, since it's so common. * @param string $field * @return string */ public static function format(string $field): string { if (strtolower($field) === 'id') { return 'id'; } if (strtolower($field) === 'ids') { return 'ids'; } return Convert::upperCamelToLowerCamel($field); } } |