Skip to content
  1. Extras
  2. Tickets
  3. Snippets
  4. getStars

getStars

Lists tickets or comments starred by the current user (TicketStar).

Wrapper around getTickets or getComments: injects favorite IDs into where and passes other parameters through.

Call uncached.

Parameters

NameDefaultDescription
&classTicketTicket for starred tickets; TicketComment for starred comments
&usercurrent user IDWhose stars to read
&tplRow chunk; tickets default to tpl.Tickets.list.row
&parents0For class=Ticket, passed to getTickets

Other getTickets / getComments params (limit, sortby, includeTVs, etc.) work as in the target snippet.

Examples

Starred tickets

fenom
{'!getStars' | snippet : [
  'class' => 'Ticket',
  'tpl' => 'tpl.Tickets.list.row',
  'limit' => 10,
]}
modx
[[!getStars?
  &class=`Ticket`
  &tpl=`tpl.Tickets.list.row`
  &limit=`10`
]]

Starred comments

fenom
{'!getStars' | snippet : [
  'class' => 'TicketComment',
  'tpl' => 'tpl.Tickets.comment.list.row',
]}
modx
[[!getStars? &class=`TicketComment` &tpl=`tpl.Tickets.comment.list.row`]]