Source for file TextInput.php
Documentation is available at TextInput.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 6: * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
- 7: *
- 8: * This source file is subject to the "Nette license" that is bundled
- 9: * with this package in the file license.txt.
- 10: *
- 11: * For more information please see http://nettephp.com
- 12: *
- 18: */
- 26: /**
- 27: * Single line text input control.
- 28: *
- 32: */
- 34: {
- 36: /**
- 41: */
- 43: {
- 51: }
- 55: /**
- 56: * Filter: shortens value to control's max length.
- 58: */
- 60: {
- 63: }
- 65: }
- 69: /**
- 70: * Sets or unsets the password mode.
- 73: */
- 75: {
- 78: }
- 82: /**
- 83: * Generates control's HTML element.
- 85: */
- 87: {
- 90: $control->value = $this->getValue() === '' ? $this->translate($this->emptyValue) : $this->value;
- 91: }
- 93: }
- 98: {
- 99: if (is_string($rule->operation) && strcasecmp($rule->operation, ':length') === 0 && !$rule->isNegative) {
- 102: } elseif (is_string($rule->operation) && strcasecmp($rule->operation, ':maxLength') === 0 && !$rule->isNegative) {
- 104: }
- 107: }
- 110: }