<?php  return 'function elements_modsnippet_51($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 \'\';

	$projId=$_REQUEST[\'proj_id\'];
	if(empty($projId)) return \'Error\';

    $tpl=\'fem.trosk.getTroskName\';
	$project=$modx->getObject(\'projects\',$projId);
    $projectUrl=$modx->makeUrl(25,\'\',array(\'proj_id\' => $project->id));  
    $project->fromArray(array(
        \'projectUrl\'=>$projectUrl,
    ));
    $projectArray = $project->toArray();
    $output .= $modx->getChunk($tpl,$projectArray);
    return $output;
}
';