/** * Parse the defined properties and populate the definition. * * @param ContainerInterface $container The container where the data shall be stored. * * @return void */ protected function parseProperties(ContainerInterface $container) { if ($container->hasPropertiesDefinition()) { $definition = $container->getPropertiesDefinition(); } else { $definition = new DefaultPropertiesDefinition(); $container->setPropertiesDefinition($definition); } foreach ((array) $this->getFromDca('fields') as $propName => $propInfo) { if ($definition->hasProperty($propName)) { $property = $definition->getProperty($propName); } else { $property = new DefaultProperty($propName); $definition->addProperty($property); } $this->parseSingleProperty($property, $propInfo); } }