Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2010 at 16:25 UTC
Updated:
14 Mar 2011 at 12:21 UTC
I have develop a display-plugin and I would like to save some custom options. not in the view object but rather in a custom table from my DB.
Actually I use the option_submit() method to save these options but it isn't good cause the save is performed on the submit of the option form, not on the save of the view wich lead to inconsistency (the user cancel his modification in the view but in my custom table those chage are preserved,....).
Thanks for any advice.
Comments
Comment #1
dawehnerI'm quite sure that there is a issue about this topic already, but i can't find this issue. It should be in the queue.
This added a new hook
There is no hook beside using form-api at the moment.
Comment #2
dimiduj commentedThanks for your support,
I'm sorry but I don't find the issue you are talking about...
I was wondering if there are reasons (performance issues, ...) to not implement such hooks ?
Finally, I 've skip the problem using a form_alter:
no hooks needed anymore on the save.
Is this solution correct ?
Comment #3
dawehnerThe reason is easy: noone wrote a patch yet/we cannot find the patch/issue anymore :)
Comment #4
iamjon commenteddimiduj,
did you ever find a solution?
I spoke to merlinofchaos about this on irc, for creating the general hook he said
It's problematic because it doesn't help you with exports.
So it's not as easy as just making a hook.
did you ever find a solution using form alter?
please update.
Comment #5
bojanz commented#551808: Provide hook_views_save, hook_view_delete
Comment #6
dimiduj commentedThe solution describe in #2 works for me.
But I need to programaticaly saved my views when I use them with features (As Earl says, this technique cause troubles on export...).
I hope this could help you.
Comment #7
Letharion commentedTemporary workaround provided, link to issue with a patch in #5.
Closing.