<?php
/**
 * @version $Id: CategoryViewAction.class.php 533 2008-09-15 01:57:56Z hodaka $
 * @package myuploader
 */

if (!defined('XOOPS_ROOT_PATH')) exit();

//require_once XOOPS_TRUST_PATH . "/modules/$mytrustdirname/class/AbstractViewAction.class.php";
require_once dirname(dirname(dirname(__FILE__)))."/class/AbstractViewAction.class.php";

class Myuploader_Admin_CategoryViewAction extends Myuploader_AbstractViewAction
{
	/**
	 * @public
	 */
	function _getId()
	{
		return xoops_getrequest('category_id');
	}

	/**
	 * @public
	 */
	function &_getHandler()
	{
		$handler =& $this->mAsset->getObject('handler', "category");
		return $handler;
	}

	/**
	 * @public
	 */
	function executeViewSuccess(&$render)
	{
		$render->setTemplateName("category_view.html");
		#cubson::lazy_load('category', $this->mObject);
		$render->setAttribute('object', $this->mObject);
	}

	/**
	 * @public
	 */
	function executeViewError(&$render)
	{
		$this->mRoot->mController->executeRedirect("./index.php?op=CategoryList", 1, _MD_MYUPLOADER_ERROR_CONTENT_IS_NOT_FOUND);
	}
}

?>
