public function __construct($db_field, $name, $label) { $this->db_field = $db_field; $form_field_class = $this->get_form_field_class(); $field = new $form_field_class($name, $label); parent::__construct($name, $field); }
public function __construct($db_field, $name, $label, $lower_bound = self::NOT_BOUNDED, $upper_bound = self::NOT_BOUNDED) { $this->db_field = $db_field; $this->lower_bound = $lower_bound; $this->upper_bound = $upper_bound; $field = new FormFieldTextEditor($name, $label, '', array('size' => 5)); parent::__construct($name, $field); }
public function __construct($name, $label, array $allowed_values) { $this->allowed_values = array_keys($allowed_values); $default_value = new FormFieldSelectChoiceOption(LangLoader::get_message('all', 'common'), ''); $this->options = array($default_value); foreach ($allowed_values as $option_value => $option_label) { $this->options[] = new FormFieldSelectChoiceOption($option_label, $option_value); } $select = new FormFieldSimpleSelectChoice($name, $label, $default_value, array_values($this->options)); parent::__construct($name, $select); }
public function __construct($name, $label, $match_regex = null) { $this->match_regex = $match_regex; $input_text = new FormFieldTextEditor($name, $label, ''); parent::__construct($name, $input_text); }