Habari\FormControl::__construct PHP Method

__construct() public method

Construct a control.
public __construct ( string $name, habari\FormStorage | string | null $storage = 'null:null', array $properties = [], array $settings = [] )
$name string The name of the control
$storage habari\FormStorage | string | null A storage location for the data collected by the control
$properties array An array of properties that apply to the output HTML
$settings array An array of settings that apply to this control object
    public function __construct($name, $storage = 'null:null', array $properties = array(), array $settings = array())
    {
        $this->name = $name;
        $this->set_storage($storage);
        $this->set_properties($properties);
        $this->set_settings($settings);
        $this->_extend();
    }