Within a snippet I am attempting to look up MIME type values for a specific file extension (as specified via System > Content Types). I discovered the
$modx->contentTypes property, but it seems to be null. Is this by design or is it supposed to contain values?
Since it is null, I am using the following code to retrieve the content types:
if (is_null($modx->contentTypes))
$modx->contentTypes = $modx->getCollection('modContentType');
Is this the best way to access content types, or is there a better or more efficient way?
Thanks,
Mike