I'm rather new to MODX. I'm passing in a resource ID, and with that, I'd like to programatically retrieve any custom TVs used by a given resource along with its value. Here's where I've gotten so far:
$resourceId = 1;
$resource = $modx->getObject('modResource', $resourceId);
/ * @TODO How do I grab any dynamically created TVs/Values? */
$array[] = [
'id' => $resource->id,
'pagetitle' => $resource->pagetitle,
'alias' => $resource->alias
];
Thank you!