How can I 'Parse' { entry.belongsTo } to array with users? From my plugin, I know I can use ...

craft()-&gt;templates-&gt;renderObjectTemplate($string, $entry)


... to parse, for example, { belongsTo.first.fullName } to the full name of the first user in the belongsTo field.

Now, I need an easy way to parse { belongsTo.find } into an array with all users related to this belongsTo field. Is there an easy way to do this, or should I let my plugin do the work?

Background information

My custom notification plugin has a settings field where I can set the 'receivers' of a notification. If an entry has a user field called 'belongsTo', and the setting is { belongsTo.find }, I need all the users related to this field, so I can further process the notification.
You should be able to use the full Twig tag for what you want to do.  Perhaps something like the following (which assumes you have an email field you are trying to output for each user and want to separate your emails by a comma):

{% for person in object.belongsTo %}{{ person.email }}{% if not loop.last %},{% endif %}{% endfor %}


renderObjectTemplate should parse both the abbreviated syntax with a single curly brace or complete Twig tags.  To take a close look, the abbreviated syntax:

{ belongsTo.first.fullName }


Is being interpreted by Craft as the following:

{{ object.belongsTo.first.fullName }}