<?php
/* get Param */
if (empty($scriptProperties['id'])) return $modx->error->failure($modx->lexicon('trosk.parametar_err_ns'));
$param = $modx->getObject('params',$scriptProperties['id']);
if (empty($param)) return $modx->error->failure($modx->lexicon('trosk.parametar_err_nf'));
 
/* set Param fields */
$param->fromArray($scriptProperties);
 
/* save Param */
if ($param->save() == false) {
    return $modx->error->failure($modx->lexicon('trosk.parametar_err_save'));
}
 
return $modx->error->success('',$param);