public function __construct($name, $attributes = null) { $templatePath = implode(DIRECTORY_SEPARATOR, [dirname(__FILE__), 'Timepicker', 'views', '']); $this->setDecorator(new Decorator($templatePath)); $this->getDecorator()->setTemplateName('jquery'); parent::__construct($name, $attributes); }
public function __construct($name, $attrs = array()) { $cls = 'form-control' . (isset($attrs['class']) ? ' ' . $attrs['class'] : ''); parent::__construct($name, $attrs); $this->setAttribute('class', $cls); }