Beispiel #1
0
 /** Генерация тега INPUT для фильтра. Значение будет подставлено если оно проходит валидацию */
 public function asInput($attr = null, $value = null)
 {
     if (is_null($value)) {
         $value = $this->getCleanValue();
     }
     return HTML::Input($this->getColumn(), $value, $attr);
 }
Beispiel #2
0
 function testInput()
 {
     $i = HTML::Input('hello', 123);
     $this->assertSelectCount('input[type=text]', true, $i, 'Тип');
     $this->assertSelectCount('input[name=hello]', true, $i, 'Имя');
     $this->assertSelectCount('input[value=123]', true, $i, 'Значение');
     $i = HTML::Hidden('hello', 123, 'myclass');
     $this->assertSelectCount('input[class=myclass]', true, $i, 'Атрибуты');
 }
Beispiel #3
0
 /** Отрисовка элемента */
 public function render()
 {
     return HTML::Input($this->getName(), $this->getTaintedValue(), $this->getAttributes());
 }