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

New messages #7

Open
remontees opened this issue Apr 21, 2014 · 4 comments
Open

New messages #7

remontees opened this issue Apr 21, 2014 · 4 comments

Comments

@remontees
Copy link
Contributor

Hello!

How to know new messages with number of new messages? May you add this in the documentation?

@reecefowell
Copy link
Member

@remontees take a look at https://github.com/codeconsortium/CCDNMessageMessageBundle/blob/master/Component/Helper/RegistryHelper.php

You can use the registry to look at cachedUnreadCount.

@remontees
Copy link
Contributor Author

But can you do an extension for twig to see quickly number of new messages, like in FOSMessageBundle?

@reecefowell
Copy link
Member

https://github.com/codeconsortium/CCDNMessageMessageBundle/blob/master/Component/TwigExtension/RegistryExtension.php

It is maybe not the cleanest solution tbh. As this will return an object instead of an integer, which i am not liking really. It could be improved upon, but for now, you can use that to get the object in a twig view.

Unless you want to do a PR for this.

@remontees
Copy link
Contributor Author

I think it is a good idea because we can use it in main templates like base.html.twig for all pages.

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