Pergunta

I am going to write a widget such as user could select country and city. The widget will use geo db from vk.com, but I want to request vk.com from the server-side, internally. Currently I am doing so by actionSuggestCities().

browser <-- widget: js routine <-- site: actionSuggestCities() <-- vk.com: api

How could I make a well-formed widget, such that someone could install it and do not add actionAutocomplete() in his controllers?

Foi útil?

Solução

I think the best is to provide a an action with the widget as an extension, to be reused in every controller using the extension, an action class extends CAction can be configured can has it's own behavior etc, read the wiki and the api

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top