private static function findSlug(array $classMetadata): string
    {
        foreach ($classMetadata as $name => $info) {
            if ($info['type'] === 'Slug') {
                return $name;
            }
        }
        throw new InvalidFetchFieldsQueryException("Class doesn't have a slug field");
    }
private static function findSlug(array $classMetadata): string
    {
        foreach ($classMetadata as $name => $info) {
            if ($info['type'] === 'Slug') {
                return $name;
            }
        }
        throw new InvalidFetchFieldsQueryException("Class doesn't have a slug field");
    }
private static function findSlug ( array $ classMetadata ) : string { foreach ( $ classMetadata as $ name => $ info ) { if ( $ info [ 'type' ] === 'Slug' ) { return $ name ; } } throw new InvalidFetchFieldsQueryException ( "Class doesn't have a slug field" ) ; }
Find the name of a section's slug field.
@param array $classMetadata
@return string
Find the name of a section s slug field .