Scalr_UI_Controller_Scripts::xGetAction PHP Method

xGetAction() public method

public xGetAction ( integer $scriptId )
$scriptId integer
    public function xGetAction($scriptId)
    {
        $this->request->restrictAccess('SCRIPTS');
        /* @var $script Script */
        $script = Script::findPk($scriptId);
        if (!$script) {
            throw new Scalr_UI_Exception_NotFound();
        }
        $script->checkPermission($this->user, $this->getEnvironmentId(true));
        $this->response->data(['script' => $this->getScriptInfo($script)]);
    }