<?php
function elements_modsnippet_48($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 '';

$tplStavka='fem.trosk.displayStavka';
$stavka=$modx->getObject('modResource',$modx->resource->id);
if(empty($stavka->content)) return 'Empty';
$trosk->convert($stavka);
$mjjed=$trosk->convertMjJed($stavka);
$stavka->fromArray(array(
	'mjjed'=>$mjjed,
));
$stavkaArray = $stavka->toArray();
return $modx->getChunk($tplStavka,$stavkaArray);
}
