<?php
// NewDeed.php
include_once('core/base/Action.php');

/**
 * Opens a new deed form.
 *
 * @author Matthew Lindberg
 */
class NewDeed extends Action
{
	
	/**
	 * Sets view to deed form.
	 *
	 * @access public
	 * @return boolean
	 */
	function execute(& $context)
	{
		global $__CS; 
		$__CS->EnterMethod("execute");
		
		$session	=& $context->getEntry(__SESSION);
		$request	=& $context->getEntry(__REQUEST);
		$timer		=& $context->getEntry(__TIMER);
		$model		=& $context->getEntry(__MODEL);
		
		include_once('core/deeds/forms/DeedForm.php');
		$deedform =& new DeedForm(& $session, & $request);
		
		include_once('core/deeds/views/DeedEditFormView.php');
		
		$view =& new DeedEditFormView(& $timer, & $model, & $deedform);
		$view->init();
		
		$controller =& $context->getEntry(__CONTROLLER);
		$controller->setView(& $view);
		return true;
	}
	
}
?>