getMany
Last updated Dec 22nd, 2019 | Page history | Improve this page | Report an issue
xPDOObject::getMany()¶
Gets a collection of objects related by aggregate or composite relations.
Syntax¶
API Docs: xPDOObject::getMany()
array &getMany (
string $alias,
[object $criteria = null],
[boolean|integer $cacheFlag = true]
)
Example¶
Get all the Chunks in a Category and output their names.
$category = $xpdo->getObject('Category',1);
$chunks = $category->getMany('Chunk');
foreach ($chunks as $chunk) {
echo $chunk->get('name').'<br />';
}