Classes

File builder/form/field/FormFieldSearch.class.php

File builder/form/field/FormFieldSearch.class.php

 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: 
<?php
/**
 * This class manages a search field.
 * @package     Builder
 * @subpackage  Form\field
 * @copyright   &copy; 2005-2019 PHPBoost
 * @license     https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL-3.0
 * @author      Julien BRISWALTER <j1.seth@phpboost.com>
 * @version     PHPBoost 5.2 - last update: 2018 06 03
 * @since       PHPBoost 4.1 - 2015 06 01
 * @contributor Arnaud GENET <elenwii@phpboost.com>
*/

class FormFieldSearch extends FormFieldTextEditor
{
    protected $type = 'search';

    /**
     * Constructs a FormFieldSearch.
     * @param string $id Field identifier
     * @param string $label Field label
     * @param string $value Default value
     * @param string[] $field_options Map containing the options
     * @param FormFieldConstraint[] $constraints The constraints checked during the validation
     */
    public function __construct($id, $label, $value, array $field_options = array(), array $constraints = array())
    {
        $this->placeholder = LangLoader::get_message('search', 'main') . '...';
        parent::__construct($id, $label, $value, $field_options, $constraints);
    }
}
?>