can someone explain getTotalMessages()

Permalink
So confused, in the messages.php this is used like so:
echo $inbox->getTotalMessages();
echo $sent->getTotalMessages();


however I can't find were $input or $sent is, so not sure what object these refer to.


If anyone is interested you require this
$inbox = UserPrivateMessageMailbox::get($ui, UserPrivateMessageMailbox::MBTYPE_INBOX);

mikeyt55
 
goldhat replied on at Permalink Reply
I dug up this API link for youhttp://www.concrete5.org/api/Concrete5_Model_UserPrivateMessageMail...

There is just a list of functions there not really any comments but if you look in the core models you should be able to find UserPrivateMessageMailbox. It will be a model, you can look at the code and figure out the objects.

You can also user var_dump() to output the object and that would tell you what it is and what data is in each one.

What package is this from, Messages? I haven't done anything with it but if you looking at a block template, you can look inside the package and find out where they are setting the $inbox and $sent.