<?php  return 'function elements_modsnippet_44($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.pdfLink\';
	$project=$modx->getObject(\'projects\',$projId);
    $toXlsUrl=$modx->makeUrl(25,\'\',array(\'proj_id\' => $project->id,\'toxls\' => \'1\'));  
    $project->fromArray(array(
        \'toPdfUrl\'=>$toXlsUrl,
    	\'tekst\'=>\'toXls\',
    ));
    $projectArray = $project->toArray();
    $output .= $modx->getChunk($tpl,$projectArray);
    return $output;
}
';