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

/**
 * User listing view.
 * @package diy-blog.backend.view.userList
 * @author	Martynas Jusevicius <hide@address.com>
 * @link	http://www.xml.lt
 */

class UserListView extends BackEndView
{

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

		$this->template->load(APP_VIEW_DIR."userList/UserList.xsl");
	}

	public function display(Request $request, Response $response)
	{
		$this->criteria->addAscendingOrderByColumn(UserPeer::TYPE);
		$this->criteria->addAscendingOrderByColumn(UserPeer::NAME);

		$users = UserPeer::doSelectJoinAll($this->criteria); //QUIRK!!!
		//$users = UserPeer::doSelectJoinChildren($this->criteria);

		$this->resolver->setArgument("users", XMLSerializer::serialize($users));

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

}

?>
Return current item: DIY Blog