<?php

/**
 *
 * @see XenResource_ControllerAdmin_Category
 */
class Waindigo_ResMans_Extend_XenResource_ControllerAdmin_Category extends XFCP_Waindigo_ResMans_Extend_XenResource_ControllerAdmin_Category
{

    protected function _getCategoryAddEditResponse(array $category)
    {
        $response = parent::_getCategoryAddEditResponse($category);

        if ($response instanceof XenForo_ControllerResponse_View) {
            /* @var $resourceManagerModel Waindigo_ResMans_Model_ResourceManager */
            $resourceManagerModel = $this->getModelFromCache('Waindigo_ResMans_Model_ResourceManager');

            $response->params['resourceManagerOptions'] = $resourceManagerModel->getResourceManagerOptions();
        }

        return $response;
    } /* END _getCategoryAddEditResponse */

    public function actionSave()
    {
        $GLOBALS['XenResource_ControllerAdmin_Category'] = $this;

        return parent::actionSave();
    } /* END actionSave */
}