I set this to a feature request as I think it is :)

For my modules views implementation I am cloning sanitize_columns from

class views_plugin_style_table extends views_plugin_style {

into

class views_plugin_style_graphapi extends views_plugin_style {
...
  function sanitize_columns($columns, $fields = NULL) {
...

which feels awkward. I expected another inheritance class but there isn't right?

Removing a field kills my view without a field sanitation.

Is there a better way?

For reference: my code is http://drupalcode.org/project/graphapi.git/tree/refs/heads/master:/views

Comments

dawehner’s picture

Well you could inherit from the table class, but i'm not sure whether this makes sense for you.
In general a generic style doesn't seem to have columns, so there might be no reason to have such a function.

clemens.tolboom’s picture

Category: feature » support

Thanks for the quick response :)

I'm not sure whether I dig it in full. I do think a lot of styles only need columns like gmap, views_datasource (from which I based) graphapi or am I coding wrong requiring a columns/fields only display?

clemens.tolboom’s picture

kars-t’s picture

This Issue is many months old. Can we close it?

clemens.tolboom’s picture

Status: Active » Closed (works as designed)

Let's do so: works as designed as I still don't get it but my project is stalled for 4 month already :/