Here's an add-on to Peter's answer:
It's easier to copy and paste the code if the annotations are included, that way the BooleanInput block is shown in the diagram view:
model IntegratorWithReset
extends Modelica.Blocks.Continuous.Integrator;
Modelica.Blocks.Interfaces.BooleanInput reset annotation(Placement(visible=true, transformation(origin={-120,-60}, extent={{-20,-20},{20,20}}, rotation=0), iconTransformation(origin={-120,-80}, extent={{-20,-20},{20,20}}, rotation=-360)));
equation
when reset then
reinit(y, y_start);
end when;
end IntegratorWithReset;