좋아, 그럼 나는 다소 좋은 해결책을 찾았습니다.
/**
* Implementation of hook_ajax_data_alter().
*/
function request_ajax_data_alter(&$object, &$type, &$view) {
$array = FALSE;
// Detect whether the data being altered is an array.
if (is_array($object)) {
$object = (object) $object;
$array = TRUE;
}
$object->scripts = $extra['scripts'];
$object->css = $extra['css'];
if (!isset($object->__callbacks)) {
$object->__callbacks = array();
}
// Add the view result to the object.
$object->view_result = $view->result;
// Set the custom event as a callback.
$object->__callbacks[] = 'Drupal.request.saveResult';
// Cast back to an array if necessary.
if ($array) {
$object = (array) $object;
}
}
나는 단순히 $ 객체에 결과>은 $보기 - 추가하고, $보기 - 추가 내 사용자 정의 콜백>는 Drupal.settings 객체에 결과를 추가했습니다.
콜백을 $ view 개체에 직접 추가하려고 시도했지만 성공하지 못했기 때문에 지금 당장이를 수행 할 것입니다.
난 당신이 hook_views_ajax_data_alter 찾고있는 생각) =이 할 수있는 더 좋은 방법이 있으면 알려
을 주시기 바랍니다 : http://api.drupal.org/api/views/views.api.php/ 함수/hook_views_ajax_data_alter/7 – aaronbauman