fewbricks\acf\fields\field::__construct PHP Method

__construct() public method

public __construct ( string $label, string $name, string $key, array $base_settings = [], array $custom_settings = [] )
$label string The label that the field will get.
$name string The name that the field will get.
$key string The key that the field wil get. It is very important that this value is unique among all the keys across the entire site.
$base_settings array
$custom_settings array Any custom settings that you want to set. A setting must be implemented in the ACF field class for it to have an effect. This array wil be merged with $base_settings in this class and then with the default settings in the ACF field class.
    public function __construct($label, $name, $key, $base_settings = [], $custom_settings = [])
    {
        $this->settings = array_merge($base_settings, $custom_settings);
        $this->settings['label'] = $label;
        $this->settings['name'] = $name;
        $this->settings['key'] = $key;
        $this->key_prepared = false;
    }