getCollection через pdoFetch

$pdo = $modx->getService('pdoFetch');

$parent = $_GET['parent'];

$where = array(
'published' => true,
'deleted' => false,
);
$tvs = 'category-img';
$options = array(
'parents' => $parent,
'includeTVs' => $tvs,
);
$ress = $pdo->getCollection('modResource',$where,$options);
foreach($ress as $key => $res){
if($res['project_total-area'] < $min_area || $res['project_total-area'] > $max_area )
unset($ress[$key]);
}
$tpl = '@INLINE <div class="item">...</div>';
$output = '';

foreach ($ress as $res) {
if($i >= $response_count * $product_count && $i < $response_count * $product_count + $product_count){
$output .= $pdo->getChunk($tpl, $res);
}
}
$response = $output != "" ?'<div class="item-list clr-a rows filter_response">'. $output .'</div>' : "";

return $response;


Конференция "Россия-Китай: история и культура"