I created a protected function isDevelopmentMode() in ControllerBase.php. This class is the base class for all other controllers.
Now I made a button for dummy data. This button should only visible in development mode. So if isDevelopmentMode() returns false the css class is hidden should be applied to the button.
How can I check if function returns true/false and based on that How to add class to button?