Hello,

I have created a custom module to get datas from a remote server (custom query).
But in the settings of my view, I don't see the aggregation options.

Do I Must add a "code" or anything in my custom module for access to this option ?

I think I have to add the Aggregate plugin in mymodule_views_plugin() function. But, I don't find examples to generate my code.

Thanks for your help !!!

CommentFileSizeAuthor
#4 no-aggregate-options.jpg154.78 KBkumkum29
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kumkum29 created an issue. See original summary.

kumkum29’s picture

Title: Custom module with handlers > no aggregation option » Custom query > no aggregation option
Issue summary: View changes
kumkum29’s picture

Hello,

I don't see how to get the Aggregate Options in views UI for my custom view.

I have tested this code in mymodule_views_plugins function:

function mymodule_views_plugins() {

  // Define custom views plugins
  return array(
    'query_aggregate' => array(
	'test' => array(
	  'title' => t('Test'),
		'method' => 'views_query_default_aggregation_method_simple',
		'handler' => array(
		  'argument' => 'views_handler_argument_group_by_numeric',
			'filter' => 'views_handler_filter_group_by_numeric',
			'sort' => 'views_handler_sort_group_by_numeric',
		  ),
	  ),
    ),
...

But, no changes in views UI, no aggregate options... Can I reuse the class of the default aggregate plugin?

Can you explain me the processus to obtain these options in views UI. Do I create an additional class to extends the views_plugin_query?

Thanks for yours replies !!!

P.S. I get this notice with the above code > Notice : Array to string conversion in views_discover_plugins() (line 447 in /srv/data/web/vhosts/mysite.com/htdocs/sites/all/modules/views/includes/plugins.inc).

kumkum29’s picture

FileSize
154.78 KB

Here an image to explain my problem:Views UI

MustangGB’s picture

Status: Active » Closed (outdated)

Closing this as outdated to tidy up a bit around here. If you're still having problems with the latest release please create a new issue.