public function control_type()
{
static $type = null;
if (is_null($type)) {
$class = get_called_class();
$type = $this->get_setting('control_type', function () use($class) {
$type = 'unknown';
if (preg_match('#FormControl(.+)$#i', $class, $matches)) {
$type = strtolower($matches[1]);
}
return $type;
});
}
return $type;
}