Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update event on plugin update? #8175

Closed
Globulopolis opened this issue Jun 22, 2015 · 2 comments
Closed

Update event on plugin update? #8175

Globulopolis opened this issue Jun 22, 2015 · 2 comments
Assignees
Labels
answered For when a question was asked and we referred to forum or answered it.
Milestone

Comments

@Globulopolis
Copy link
Contributor

Hi!
I can't find anything about it in Plugin class. Maybe we could add an update() method which will be called when plugin just updated from remote or local?
Or maybe another solution exists?

@tsteur
Copy link
Member

tsteur commented Jun 23, 2015

Such a solution exists but it might be not documented on the website. You can generate an update via ./console generate:update. It will ask for your plugin name and then generate a file under plugins/YourPlugin/Updates/yourVersionNumber.php.

There are some explanations in the generated file but also see eg those examples:

An example is here: https://github.com/piwik/plugin-CustomAlerts/tree/master/Updates

@tsteur tsteur closed this as completed Jun 23, 2015
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Jun 23, 2015
@tsteur tsteur added this to the 2.14.0 milestone Jun 23, 2015
@tsteur tsteur self-assigned this Jun 23, 2015
@mattab
Copy link
Member

mattab commented Jun 24, 2015

It's not documented yet. Here is issue to track the new doc: matomo-org/developer-documentation#84

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

3 participants