I want to call ajax callback function from another module's controller in Drupal 8. is it possible? I am giving the code of my main form and the controller of another module where the ajax callback is written. Actually this ajax callback function will be used in different forms. So I want to create a common module to call this function. Kindly help.
This is the form field of main form:

    $form['construction_type'] = array(
  '#type' =&gt; 'radios',
  '#title' =&gt; $this-&gt;t('1. Whether Boiler or Economiser:'),
  '#default_value' =&gt; 'b',
  '#options' =&gt; array('b' =&gt; $this-&gt;t('Boiler'), 'e' =&gt; $this-&gt;t('Economizer')),
  '#ajax' =&gt; [
                  'callback' =&gt; '\Drupal\common_functions\Controller\CommonFunctionsController :: ajax_load_boiler_size',

               ],
);


And this is the ajax callback function in controller of another module

    class CommonFunctionsController extends ControllerBase{  public function ajax_load_boiler_size(array &amp;$form, FormStateInterface $form_state){
$response = new AjaxResponse();
$response-&gt;addCommand(new ReplaceCommand('#boiler_size_div', $form['boiler_size']));
return $response;


}

The error message is Symfony\Component\HttpKernel\Exception\HttpException: The specified #ajax callback is empty or not callable.
If anything, this should be:

'callback' =&gt; ['\Drupal\common_functions\Controller\CommonFunctionsController', 'ajax_load_boiler_size'],


That's only if it's going to work though. No guarantees.