* * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ /** * A text input field. * * @author Bernhard Schussek */ class TextField extends InputField { /** * {@inheritDoc} */ protected function configure() { parent::configure(); $this->addOption('max_length'); } /** * {@inheritDoc} */ public function render(array $attributes = array()) { return parent::render(array_merge(array( 'type' => 'text', 'maxlength' => $this->getOption('max_length'), ), $attributes)); } }