<?php  return 'function elements_modsnippet_14($scriptProperties= array()) {
global $modx;
if (is_array($scriptProperties)) {
extract($scriptProperties, EXTR_SKIP);
}
$trosk = $modx->getService(\'trosk\',\'Trosk\',$modx->getOption(\'doodles.core_path\',null,$modx->getOption(\'core_path\').\'components/trosk/\').\'model/trosk/\',$scriptProperties);
if (!($trosk instanceof Trosk)) return \'\';
 
    $tpl=\'fem.trosk.listTrosks\';
    $criteria=$modx->newQuery(\'projects\');
    $criteria->where(array(
         \'createdby\' => $modx->user->id,
    ));
    $criteria->sortby(\'id\',\'DESC\');
    $projects=$modx->getCollection(\'projects\',$criteria);
    $i=0;
    $output=\'\';
    foreach ($projects as $project) {
      $projectUrl=$modx->makeUrl(25,\'\',array(\'proj_id\' => $project->id));  
      $project->fromArray(array(
        \'projectUrl\'=>$projectUrl,
      ));
      $projectArray = $project->toArray();
      $output .= $modx->getChunk($tpl,$projectArray);
    };
    return $output;
}
';