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

Link between Plugin Admin and Plugin Public [ Extends from A class ? ] #555

Open
ahsynv opened this issue Mar 8, 2021 · 2 comments
Open

Comments

@ahsynv
Copy link

ahsynv commented Mar 8, 2021

Hi,

We are using this boilerplate for many plugins, but everytime we need a custom solution to have the same function in the Admin and Public class. Is it possible to add some support by default like : ( "UTILS" below can be juste a PLUGINNAME_Utility or other, its just an exemple )

PLUGINNAME_Public extends UTILS ...

and

PLUGINNAME_Admin extends UTILS ...

? Because sometimes we need to use the same fonctionnality in theses 2 Classes. Thanks

@otakupahp
Copy link

To overcome that, I usually create a static helper class that could be used in both.

I also modified the loader to autoload the classes

@ahsynv
Copy link
Author

ahsynv commented Mar 9, 2021

To overcome that, I usually create a static helper class that could be used in both.

I also modified the loader to autoload the classes

Yes its what we do too but its repetitive 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants