Implemented: Ini settings based custom template operator configuration#2
Merged
rey0bs merged 1 commit intoOpen-Wide:masterfrom Sep 5, 2014
Conversation
rey0bs
pushed a commit
that referenced
this pull request
Sep 5, 2014
rey0bs
pushed a commit
that referenced
this pull request
Sep 5, 2014
Contributor
|
This feature is very usefull, thanks ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
One aspect to this extension that has always bothered our developers is the need to edit or customize the extension/OWSimpleOperator/autoloads/eztemplateautoload.php file to add custom template operator functions. (As instructed in the documentation)
By comparison in our other custom template operator extension, wrapoperator we do not have to customize any core extension php files to add user defined template operator functions, instead we have settings based configuration for this need: https://github.com/brookinsconsulting/wrapoperator/blob/master/settings/wrapoperator.ini#L11
We have taken the time to introduce ini settings based custom template operator configuration into the OWSimpleOperator extension.
With our changes in place you can define custom template operator functions via ini settings. This means you can leave the core php files of the OWSimpleOperator alone / stock / as default.
To add a custom template operator function just edit the owsimpleoperator.ini.append.php template override say in settings/override/owsimpleoperator.ini.append.php file and add the template operator file path (ezp4 compat), template operator class name and template operator class method name configuration settings you desire. Then clear ini caches and you can use your custom template operator right away! No more hacking of core extension php files like extension/OWSimpleOperator/autoloads/eztemplateautoload.php which can't be overriden with class based overrides.
Please let us know what you think of this new feature! We think it's great for all users of this extension! Especially in multi site configurations.
Cheers,
Brookins Consulting