Cake\ElasticSearch\Datasource\MappingSchema::fieldType PHP Method

fieldType() public method

Can access nested fields through dot paths.
public fieldType ( string $name ) : string | null
$name string The path to the field you want.
return string | null Either type information or null
    public function fieldType($name)
    {
        $field = $this->field($name);
        if (!$field) {
            return null;
        }
        return $field['type'];
    }