Location: PHPKode > projects > DIY Blog > diy-blog/classes/diy-blog/backend/view/userCreate/CreateUserView.class.php
<?php

/**
 * A view for creating a new User.
 * @package diy-blog.backend.view.userCreate
 * @author	Martynas Jusevicius <hide@address.com>
 * @link	http://www.xml.lt
 */

class CreateUserView extends BackEndView
{

	protected $criteria = null;
	
	public function __construct(Resource $resource = null)
	{
		parent::__construct($resource);
		$this->criteria = new Criteria();

		$this->template->load(APP_VIEW_DIR."userCreate/CreateUser.xsl");
	}

	public function display(Request $request, Response $response)
	{
		if ($request->getAttribute("user-result") != null)
		{
			$this->proc->setParameter("", "user-result", $request->getAttribute("user-result"));

			$this->resolver->setArgument("user-errors", XMLSerializer::serialize($request->getAttribute("user-errors")));
			$this->resolver->setArgument("user-form", XMLSerializer::serialize($request->getAttribute("user-form")));

			//if ($request->getAttribute("result") == "success") $this->resolver->setArgument("user", XMLSerializer::serialize($request->getAttribute("user")));
		}

		parent::display($request, $response);
		$response->setStatus(Response::SC_OK);
	}

}

?>
Return current item: DIY Blog