From 634a26ed85e24552e1883818ae611ae9814c989d Mon Sep 17 00:00:00 2001 From: pamatt Date: Thu, 21 Mar 2013 01:19:40 +0100 Subject: [PATCH] Issue #1946398 by pamatt: fixed hook_views_data_alter() examples. --- views.api.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/views.api.php b/views.api.php index 33690e2..ba9b326 100644 --- a/views.api.php +++ b/views.api.php @@ -482,13 +482,15 @@ function hook_views_data_alter(&$data) { $data['users']['example_field'] = array( 'title' => t('Example field'), 'help' => t('Some example content that references a user'), - 'handler' => 'hook_handlers_field_example_field', + 'field' => array( + 'handler' => 'modulename_handler_field_example_field', + ), ); // This example changes the handler of the node title field. // In this handler you could do stuff, like preview of the node when clicking // the node title. - $data['node']['title']['handler'] = 'modulename_handlers_field_node_title'; + $data['node']['title']['field']['handler'] = 'modulename_handler_field_node_title'; // This example adds a relationship to table {foo}, so that 'foo' views can // add this table using a relationship. Because we don't want to write over -- 1.7.9.5