mirror of
https://github.com/opensolutions/ViMbAdmin.git
synced 2026-04-26 00:36:00 +03:00
[PR #134] [MERGED] Hook rewrite return value #289
Labels
No labels
bug
feature
feature
improvement
improvement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ViMbAdmin-opensolutions#289
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/opensolutions/ViMbAdmin/pull/134
Author: @mfechner
Created: 3/24/2015
Status: ✅ Merged
Merged: 4/2/2016
Merged by: @barryo
Base:
master← Head:hook_rewrite_return_value📝 Commits (4)
3a0e58eAdded the possibility that a plugin function can stop the workflow if it return a false.13120a8If an alias is deleted, continue only, if all called hooks from all plugins give green light to continue with the deletion.d4f2fd6A not existing hook function in a plugin will always cause a true return value to not break interrupt flow.b65ac65Make sure the toggle function for the alias return the correct value to return error message to user why a alias could not be deactivated.📊 Changes
3 files changed (+37 additions, -25 deletions)
View changed files
📝
application/controllers/AliasController.php(+28 -23)📝
library/ViMbAdmin/Controller/PluginAction.php(+8 -2)📝
library/ViMbAdmin/Plugin.php(+1 -0)📄 Description
I required the functionality to implement checks in plugins.
These checks must be able to forbid core to write values into the database.
As this logic is part of the plugin the hook system must be able to handle return values.
With these modifications the called hooks can return a false value and therefor are able to inform core to not execute the triggered action, but display an error message.
Would be nice if this could be merged into the repository.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.