* Get a form field type compatible with the current version of Symfony
30
*
31
* @param string $class
32
* @return string Class or type name
33
*/
34
public static function getType($class)
35
{
36
if (!self::isLegacy()) {
37
return $class;
38
}
39
40
if (!isset(self::$map[$class])) {
41
throw new \InvalidArgumentException(sprintf('Form type with class "%s" can not be found. Please check for typos or add it to the map in LegacyFormHelper', $class));
42
}
43
44
return self::$map[$class];
45
}
46
47
/**
48
* Check whether to use legacy form behaviour from Symfony <3.0