Forums | Mahara Community

Developers /
Blocktype plugin initialization method


anonymous profile picture
Account deleted
Posts: 1

08 June 2010, 12:16

Hi

I am doing a blocktype plugin for mahara and i have a small problem. I have an object that execute the logic of the plugin. The problem is where i can initialize it. At first i start initializing the object in the instance_config_form because i need to put in the config form and html code generated by this object. This doesn't work because this method is called more than once. This method is called to generate the form and then, when you click save it is called another time. Why?.

I can't put here the initialization code because every time this form is called the html code change because a new instance of the class is created.

Where i can initialize an object inside the plugin that i'm sure that is called only at first? Doesn't have the blocktype plugins '__construc' like method to set parameters?

Thanks.
1 result