Smile\ElasticsuiteCore\Index\Mapping\Field::__construct PHP Method

__construct() public method

Constructor.
public __construct ( string $name, string $type = 'string', null | string $nestedPath = null, array $fieldConfig = [] )
$name string Field name.
$type string Field type.
$nestedPath null | string Path for nested fields. null by default and for non-nested fields.
$fieldConfig array Field configuration (see self::$config declaration for available values and default values).
    public function __construct($name, $type = 'string', $nestedPath = null, $fieldConfig = [])
    {
        $this->name = (string) $name;
        $this->type = (string) $type;
        $this->config = $fieldConfig + $this->config;
        $this->nestedPath = $nestedPath;
    }