Admin_ClassController::importClassAction PHP Метод

importClassAction() публичный Метод

public importClassAction ( )
    public function importClassAction()
    {
        $class = Object\ClassDefinition::getById(intval($this->getParam("id")));
        $json = file_get_contents($_FILES["Filedata"]["tmp_name"]);
        $success = Object\ClassDefinition\Service::importClassDefinitionFromJson($class, $json);
        $this->removeViewRenderer();
        $this->_helper->json(["success" => $success], false);
        // set content-type to text/html, otherwise (when application/json is sent) chrome will complain in
        // Ext.form.Action.Submit and mark the submission as failed
        $this->getResponse()->setHeader("Content-Type", "text/html");
    }