1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38:
<?php
abstract class HTMLTableAjaxUserAutoCompleteFilter extends AbstractHTMLTableFilter
{
private $match_regex;
public function __construct($name, $label, $match_regex = null)
{
$this->match_regex = $match_regex;
$input = new FormFieldAjaxUserAutoComplete($name, $label, '', array(), array(new FormFieldConstraintUserExist()));
parent::__construct($name, $input);
}
public function is_value_allowed($value)
{
if (empty($this->match_regex) || preg_match($this->match_regex, $value))
{
$this->set_value($value);
return true;
}
return false;
}
}
?>