public function parse()
 {
     $modelName = $this->getDataModelVerify()->getModelName();
     $modelConfig = $this->getConfigServiceVerify()->getByObject($modelName, new ModelConfig());
     if ($modelConfig == null) {
         throw new \Exception('Please fill ModelConfig for the ' . $modelName . '. I can\'t work on');
     }
     $formConfigParser = new FormConfigParser();
     //        $formConfigParser->setFieldTypesService($this->getFieldTypesServiceVerify());
     //        $formConfigParser->setModelConfi($modelConfig);
     $formConfigParser->init()->notify();
     return $formConfigParser;
 }
Exemplo n.º 2
0
 public function parse()
 {
     $formConfigParser = new FormConfigParser();
     $dataModel = $this->getDataModelVerify();
     $modelName = $dataModel->getModelName();
     $formConfigParser->setFieldTypesService($this->getFieldTypesServiceVerify());
     $formConfigParser->setQueryService($this->getQueryServiceVerify());
     $formConfigParser->setGatewayService($this->getGatewayServiceVerify());
     $formConfigParser->setConfigService($this->getConfigServiceVerify());
     $formConfigParser->setModelConfig($this->getModelServiceVerify()->getModelConfig($modelName));
     $aclData = null;
     if ($dataModel instanceof AclDataModel) {
         /**
          * @var AclConfig $aclData
          */
         $aclData = $dataModel->getDataPermissions();
         $formConfigParser->setAclConfig($aclData);
         $formConfigParser->setDataModel($dataModel->getDataModel());
     } else {
         $formConfigParser->setDataModel($dataModel);
     }
     $formConfigParser->setLimitFields($this->getLimitFields());
     $formConfigParser->init()->notify();
     return $formConfigParser;
 }