Admin_ClassController::importFieldcollectionAction PHP Метод

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

    public function importFieldcollectionAction()
    {
        $fieldCollection = Object\Fieldcollection\Definition::getByKey($this->getParam("id"));
        $data = file_get_contents($_FILES["Filedata"]["tmp_name"]);
        $success = Object\ClassDefinition\Service::importFieldCollectionFromJson($fieldCollection, $data);
        $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");
    }