The fetch functions were designed to be used in template, so it will be safe to use them in template.
But if you try to use fetchCommentListByContentObjectIDList in php, I think the problem is that the sortby field missing(which can be seen as a inconvenient issue :) ). So if you use fetchCommentListByContentObjectIDList(null,null,null,null,'modified',null,0,100,array()), it should work.
But still fetch function in template is recommended.
I have not used the fetchCommentLIstByContentObjectIDList after encountering the problem of calling it from php.. Also i have successfully been using fetchLatestComments:)
I will try to use the other function just to test if it works with adding the sortby field:)
Once again, thanks
Bayron Guevara
Monday 27 September 2010 10:57:31 pm
Hello Lars,
As Jerom said, you can call a fetch function from PHP as easier as inside a template. Just make a call to eZFunctionHandler::execute with the appropiate parameters. In your case it would be something like: