<?php
/**
 * @version $Id: AbstractDeleteAction.class.php 531 2008-09-03 05:44:05Z hodaka $
 * @package myuploader
 */ 

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

require_once dirname(dirname(__FILE__))."/class/AbstractEditAction.class.php";

/**
 * Myuploader_AbstractDeleteAction
 */
class Myuploader_AbstractDeleteAction extends Myuploader_AbstractEditAction
{
    /**
     * _isEnableCreate
     * 
     * @param   void
     * 
     * @return  bool
     * 
     * @protected
     */
    function _isEnableCreate()
    {
        return false;
    }

    /**
     * prepare
     * 
     * @param   void
     * 
     * @return  bool
     * 
     * @public
     */
    function prepare()
    {
        return parent::prepare() && is_object($this->mObject);
    }

    /**
     * _doExecute
     * 
     * @param   void
     * 
     * @return  Enum
     * 
     * @protected
     */
    function _doExecute()
    {
        if($this->mObjectHandler->delete($this->mObject))
        {
            return MYUPLOADER_FRAME_VIEW_SUCCESS;
        }
    
        return MYUPLOADER_FRAME_VIEW_ERROR;
    }
    
}

?>