public function createContentOfThisTypeWithProperties($fieldType, TableNode $properties, $name = null) { $this->createField($fieldType, $name); foreach ($properties as $property) { if ($property['Validator'] == 'maximum value validator') { $this->addValueConstraint($fieldType, $property['Value'], 'max'); } elseif ($property['Validator'] == 'minimum value validator') { $this->addValueConstraint($fieldType, $property['Value'], 'min'); } } }