public function createConfig(ConfigTypeDefinition $configTypeDefinition, $properties = [], $viewName = "default", $workspace = "default", $language = "default")
 {
     $classname = $this->getRecordClassForConfigType($configTypeDefinition->getName());
     /** @var Config $config */
     $config = new $classname($configTypeDefinition, $viewName, $workspace, $language);
     $config->setRevision(0);
     if ($this->getOption('validateProperties') == true) {
         foreach ($properties as $property => $value) {
             $config->setProperty($property, $value);
         }
     } else {
         $config->setProperties($properties);
     }
     return $config;
 }
예제 #2
0
 public function getConfigTypeName()
 {
     return $this->dataTypeDefinition->getName();
 }