In the link given below ,
https://drupal.org/node/224333
So as given in below statement you do not have to declare the callback path* what does this mean?
I have hook_menu() in d6 which is as follows :
$items['ort/add/ion'] = array(
'type' => MENU_CALLBACK,
'page callback' => 'ort_add_ion',
'access arguments' => array('access content'),
'file' => 'ort.tion.inc',
);
Does the link say that for d7 you do not need page callback or something different?
In Drupal 7, you do not have to declare the callback path in hook_menu(), and the callback function is far simpler.
Drupal 6:
<?php
// This function must be pointed to in hook_menu() in D6.
function my_callback_function() {
// ... Much work to build the form ....
drupal_process_form($form_id, $form, $form_state);
$form = drupal_rebuild_form($form_id, $form_state, $args, $form_build_id);
$output = drupal_render($form);
// Final rendering callback.
print drupal_json(array('status' => TRUE, 'data' => $output));
exit();
}
?>
Drupal 7:
<?php
// No path needs be set up to point to the function, and $form and $form_state are provided.
function my_callback_function($form, &$form_state) {
// Often you would select a portion of the form to match #ajax['wrapper']
// rather than processing the whole form.
return $form; // Either HTML or a render array may be returned.
}
?>