-
Notifications
You must be signed in to change notification settings - Fork 228
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
[FEATURE] Add CollectionViewHelper #578
Conversation
Thank you very much! I hope you dont mind the comments :) Cheers, |
One more question: when I'm working at the file locally, do I have to checkout into separate branch for every edit that I make and then merge, or can I just work on the development branch locally? edit: OK, I got it, I didn't need to merge with development locally before merge, i should have used edit2: now I get it... I should have created a separate branch not just locally, but also in my github forked repository... And also I've just discovered there's a way to add and edit files straight from github's web interface. For small edits it may be more convenient. |
|
||
/** | ||
* @var \TYPO3\CMS\Core\Collection\RecordCollectionRepository | ||
* @inject |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use an injection method - it's more efficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, didn't know that! I was curious of why you still use those clumsy injection methods...
I'll fix it this evening.
Hi @dimaip, are you still into this PR? @NamelessCoder explained his objections against the Cheers |
I'll try to find time tomorrow. Sent from mobile.
|
Have a look, guys, I've tried to update the code according to @NamelessCoder's suggestions. Sorry for being so slow :( |
Almost there - just a bit of cleanup to do and one error prevention measure: Before calling a method on the value returned from the ResourceRepository the value must be checked. If for example an invalid reference is passed, the current code would cause a fatal PHP error (method called on non-object). To safeguard, early-return And to clean up the git commit history: Do |
Sorry for being turtle-slow :( |
I didn't notice until now, but the class is using the old style class name and should be using namespaces, e.g. Code behaviour is perfect now :) |
Use RecordCollection API to retrieve RecordCollection by uid.
Like this? |
Exactly like that :) thanks Dmitri :) |
[FEATURE] Add CollectionViewHelper
Thanks for your patience, Claus. I'm glad it worked out, after all! |
It's the first time I try to commit something on Github, so help me out if I'm doing something really wrong.
I didn't know to what category to add this VH to, so feel free to relocate it.