<?php
	$modx->addPackage('trosk',$modx->getOption('core_path').'components/trosk/model/');
	$name = $hook->getValue('name');
	$project = $modx->newObject('projects');
    $project->fromArray(array(
      'name' => $name,
      'createdby' => $modx->user->id,
    ));
    if(!$project->save()) return 'Error';
    return true;
