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

Decopule message arguments in ctools plugin #6

Closed
RoySegall opened this issue Jan 11, 2015 · 3 comments
Closed

Decopule message arguments in ctools plugin #6

RoySegall opened this issue Jan 11, 2015 · 3 comments
Assignees

Comments

@RoySegall
Copy link

Until now the message arguments were saved in the DB into the message objects. The disadvantages of it are:

  1. The information for each message, value or callback, and if we need to maintain the value we need to iterate over the messages and update the value or change the arguments.
  2. The information is shared to all the messages form the same bundle. Store this data in the DB for each message is a pretty much over kill and can live outside the DB.

This will affect the 8.x-1.x branch as well.

@wundo
Copy link

wundo commented Feb 19, 2015

2. The information is shared to all the messages form the same bundle. Store this data in the DB for each message is a pretty much over kill and can live outside the DB.

Could you elaborate on that?
I have spent the last two days trying to wrangle a patch that allows me to not store the message text itself on the database at all (I would store only the arguments).

I'm not sure if it would be a good approach or not, is this patch a step on that direction?
Do you think this is a good approach?

@amitaibu
Copy link
Member

Could you elaborate on that?

This PR address the cases where you would hardcode the callback functions in the message's arguments - just so they can be invoke upon $message->getText(). This PR will allow to add those callbacks on the fly via hook_entity_load() - thus avoiding saving the same data over and over again per message

@RoySegall
Copy link
Author

@amitaibu Can you review the PR? 10x.

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

3 participants