modResource.getProperties
Last updated not available | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn moremodResource.getProperties¶
Returns the whole property array stored under $namespace, or an empty array when that namespace has no entry. The properties field holds one array per namespace; pass the namespace you want, not a flat list of keys.
Syntax¶
array getProperties ([string $namespace = 'core'])
-
$namespace(string) namespace to read, by default'core'
Example¶
$resource = $modx->getObject('modResource', array('id' => 5));
$resource->setProperties(array('color' => 'foobar'), 'mycomponent');
$props = $resource->getProperties('mycomponent');
See Also¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










