create a protected method ``getFields($fields)``