/** * renderDefault * * @param AbstractField $field * @param array $attribs * * @return string */ public function renderInput(AbstractField $field, array $attribs = []) { $type = $field->getType(); $type = static::resolveAlias($type); $handler = static::getRenderer($type); if ($handler) { return $handler($field); } $method = 'render' . ucfirst($type); if (is_callable(array($this, $method))) { return $this->{$method}($field, $attribs); } $attribs['class'] .= ' form-control'; return $field->buildInput($attribs); }