<?php

class nc_services_direct_admin_ui extends nc_services_admin_ui
{

    /**
     * @param string $current_action
     */
    public function __construct($current_action = "index")
    {
        parent::__construct('direct', NETCAT_MODULE_SERVICES_DIRECT);

        $this->_action = $current_action;

        $this->treeSelectedNode = "services-direct";
    }

    /**
     * @return string
     */
    public function to_json()
    {
        if ($this->locationHash == 'module.services.direct') {
            if ($this->_action != "index") {
                $this->locationHash = "module.services.direct." . $this->_action;
            }
        }
        return parent::to_json();
    }

}
