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

Move logic to model #87

Merged
merged 2 commits into from
Jan 1, 2020
Merged

Conversation

HLeithner
Copy link

Also added a more future proved way to add information to the layout.

@HLeithner HLeithner changed the base branch from 4.0-dev to static January 1, 2020 11:42
@HLeithner
Copy link
Author

I'm still fixing some things

@brianteeman
Copy link
Owner

ok - ping back when its ready.

Now you can see the limits of my abilities ;)

@HLeithner
Copy link
Author

So this part is ready, wanted to make it possible to layout this in the template but then the "htmlhelper link" comes between me and the solution... and I didn't want to make it to complicated

@brianteeman
Copy link
Owner

yeah I tried the layout route myself and failed ;)

@HLeithner
Copy link
Author

js still missing, no idea if we have already a solution for this somewhere in our code base. I know it only from the menu button to call some js for reloading...

@brianteeman brianteeman merged commit b47d6e0 into brianteeman:static Jan 1, 2020
@brianteeman
Copy link
Owner

yes we have the js for it in admin-add_module.js

it is used to refresh the cpanel after adding a module

@HLeithner HLeithner deleted the teestatic-model branch January 1, 2020 12:01
@brianteeman
Copy link
Owner

Could you explain this code
<?php echo Text::sprintf(...$message['message']); ?>
Also does it really need to be an array of messages as you will only ever have one?

@HLeithner
Copy link
Author

Thats the future proof part ;). I want to have this as patten also for other libs and extensions.

My first approach was to have an additional key containing the parts to build the link in the template, but ended with the feeling of over engineering...

...$array explodes the array to function parameters...

Maybe it makes sense to move the foreach part to a layout then we could move the link creation there too

@brianteeman
Copy link
Owner

I understand you now about the new code.

If you can document that a bit then I can have a go at converting others.

@HLeithner
Copy link
Author

No sure if I can do this today, no lunch and then I have to assemble my new pc...

I will came up with a better solution later or tomorrow

@brianteeman
Copy link
Owner

no problem. I am doing something similar now for smart-search but its much easier for that component

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

Successfully merging this pull request may close these issues.

2 participants